-
Notifications
You must be signed in to change notification settings - Fork 270
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
Problems with transaction:false #182
Comments
Which version of dbmate are you using? |
VERSION: |
Info from docker shell
|
Did upgrade to |
Same here. Getting
|
Turns out I had more than one statement in the up migration, and apparently it can only be a single one if not in transaction. |
That's definitely not intentional. I don't have time to investigate right now, but it should be possible to run multiple statements with I'm fairly sure this used to work, so if someone has time to test out previous versions and figure out when this broke ( |
The thing is that PostgreSQL wraps statements into internal transaction if they are executed outside of transaction. See (hacky) solution of that for go-migrate here |
This is still a problem with 1.12.1. |
fwiw, I tried running this migration on v1.5 and it still fails with -- migrate:up transaction:false
CREATE INDEX CONCURRENTLY invalidated_at_index ON jobs (invalidated_at);
CREATE INDEX CONCURRENTLY state_index ON jobs (state);
CREATE INDEX CONCURRENTLY status_index ON jobs (status);
-- migrate:down
DROP INDEX invalidated_at_index;
DROP INDEX state_index;
DROP INDEX status_index;
DROP INDEX metadata_expiring_rekick_submitted_index; |
This is likely the same issue as in #126. |
Duplicate of #126. |
Hi! I am running dbmate migrations inside docker and for some reason the parameter
transaction:false
is completely ignored.and I still get
Error: pq: CREATE INDEX CONCURRENTLY cannot run inside a transaction block
Any advice where can I look, debug, configure?
The text was updated successfully, but these errors were encountered: