Skip to content

Wrong migration order for unique_index when renaming field #159

Open
@michaelst

Description

@michaelst

Recreating the unique_index should happen after the rename action or do both index actions after the rename

  def down do
    drop_if_exists unique_index(:access__teams, [:license_key_id],
                     name: "access__teams_license_key_id_index"
                   )

    create unique_index(:access__teams, [:idp_entity_id],
             name: "access__teams_idp_entity_id_index"
           )

    rename table(:access__teams), :license_key_id, to: :idp_entity_id
  end

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions