Skip to content

MySQL drop of unique index is doubled when using autogenerate #276

@sqlalchemy-bot

Description

@sqlalchemy-bot

Migrated issue, originally created by Johannes Erdfelt (@jerdfelt)

When autogenerate is used and a unique index is removed, it will appear as both a remove of a unique constraint and a unique index.

This effectively doubles the drop causing the second to fail.

The attached test case reproduces the problem:

[('remove_constraint',
UniqueConstraint(Column('s', VARCHAR(length=20), table=<unq_idx>))),
('remove_index',
Index('test_uc_1', Column('s', VARCHAR(length=20), table=<unq_idx>), unique=True))]


Attachments: alembic_mysql_double_drop_testcase.py

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions