core icon indicating copy to clipboard operation
core copied to clipboard

RENAME INDEX in conditional migrations

Open 7even opened this issue 7 years ago • 0 comments

Postgres allows renaming indexes, and while it is impossible to use inside the schema diffing algorithm (as indexes are compared by name) it can still be used inside conditional migrations.

Adding an Operations::RenameIndex (and respective rename_index in the Migrator) and handling it with execute('ALTER INDEX name RENAME TO new_name') in the Reader should do it.

7even avatar Jan 20 '19 15:01 7even