Closed bobbypriam closed 1 year ago
+1. Same here. The upgrade is breaking. Same error too.
ah i was almost going to change that one too.
Can I just confirm that the migration given is fairly old, op.drop_index("dummy_index_name", "dummy_table_name")
should not be the format that we output now. I would need to check when we changed this.
hm, OK so, the correct form of this migration:
def upgrade() -> None:
# This worked on 1.10.4, but broke on 1.11.0
op.drop_index("dummy_index_name", "dummy_table_name")
pass
should be this:
def upgrade() -> None:
op.drop_index("dummy_index_name", table_name="dummy_table_name")
pass
It looks like the previous syntax was changed in this commit: 20c08069. that was in 2014.
kind of a tossup if we just please ask users to upgrade very old migrations or not, but I'll restore it now anyway.
Mike Bayer has proposed a fix for this issue in the main branch:
restore drop_index.table_name as positional https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4618
Yeah, this is from an old migration. Thank you so much for looking into this.
Describe the bug Upgrading from 1.10.4 to 1.11.0 breaks existing migration, possibly due to this change: https://github.com/sqlalchemy/alembic/issues/1130
Expected behavior Existing migration still works, or a deprecation warning with clear migration path is given.
To Reproduce Please try to provide a Minimal, Complete, and Verifiable example, with the migration script and/or the SQLAlchemy tables or models involved. See also Reporting Bugs on the website.
Error
Versions.
alembic==1.11.0
SQLAlchemy==2.0.13
PyMySQL==1.0.3
Additional context
Have a nice day!