Skip to content

RENAME INDEX in conditional migrations #10

Description

@7even

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions