-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
We've got an issue with new index migrations where we have to run them with CREATE INDEX CONCURRENTLY to avoid locking our busiest tables. However when we do this, rambler is unable to apply the migrations because we get errors like:
17:33 info 1 migrations to apply
17:33 info applying 202505211135_add_field_to_table.sql
unable to apply migration 202505211135_add_field_to_table.sql: pq: CREATE INDEX CONCURRENTLY cannot run inside a transaction block
CREATE INDEX CONCURRENTLY IF NOT EXISTS field_index_idx ON table(column_1, column_2);
Is there a workaround for this (apart from applying the index manually and then merging in the migrations into our repo?) - We have migrations run automatically during our deployment flow which is why we've got IF NOT EXISTS to allow migrations to be run both manually and via CI/CD when needed.
Metadata
Metadata
Assignees
Labels
No labels