-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support creating multiple indexes concurrently in a single migration postgresql #284
Comments
So psql is able to do what you expect above since they have autocommit turned on. You can repro that this wont work with psql by setting autocommit off ( To make this ^ work we would need to figure out how to turn on autocommit. |
Note this happens with |
Closing as this is not a restriction of |
Is there any news on this? May I ask you how did you solve, @julieqiu? |
For now, I'd break up your statements into separate migration files until the postgres driver supports multiple statements in a single migration file. |
If I have 30 tables and I need many indexes on each of them how many files will i need? 30 * 3~? Really? |
This is what I ended up doing. Alternatively, I would just run |
@frederikhors It may be easier to add support for multiple statements than to write 90+ migrations |
I would like to be able to do that. |
Gonna work on it |
Describe the Bug
I'd like to add multiple indexes to my postgresql schema in a single migration file.
Steps to Reproduce
Expected Behavior
I expected the migration to succeed and add both indexes. This migration does succeed if I only try to create one index at a time and have two sequential migration files with the following contents:
The text was updated successfully, but these errors were encountered: