Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to add enum value through Migration script #63

Open
huniyal2 opened this issue Apr 3, 2021 · 1 comment
Open

Not able to add enum value through Migration script #63

huniyal2 opened this issue Apr 3, 2021 · 1 comment

Comments

@huniyal2
Copy link

huniyal2 commented Apr 3, 2021

As the migration scripts used to run in a single transaction , when trying to run the db-migrate:up for pg, getting the below error.
ALTER TYPE ... ADD cannot run inside a transaction block

Query that i am trying to run in script.

ALTER TYPE document_type ADD VALUE 'new value' AFTER 'existing value';
package version i am using in project .
"pg": "^8.5.1",
"db-migrate": "^0.11.11",
"db-migrate-pg": "^1.2.2",

Is there any workaround to skip the transaction for a particular or any suggestions ? It would be very helpful


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@wzrdtales
Copy link
Member

If you want to disable transactions you can use notransactions. That is however a global flag --non-transactional currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants