Open stephenfin opened 3 months ago
Hi,
This was caused by the change done as part of #1093 and mentioned in this change note: https://alembic.sqlalchemy.org/en/latest/changelog.html#change-3bdff00f5f667e502dd8506162574a24
I agree that we could note a bit better that the rename_table
was removed as a consequence of the change of the class hierarchy in between operation and batch operation.
So I would consider this only a documentation change. @zzzeek do you agree here?
Can you provide a PR with the updated changelog?
doc change is fine sure
Describe the bug
After an upgrade to 1.11.x, I now see the following error messages in a migration:
The migration in question is doing this:
Things worked (or at least, didn't fail) on 1.10.4 and before. Now, the ops docs suggest this was never supported, but it worked and therefore we used it.
The fix is rather easy: we can just change the above to:
...but there's no mention of this change in behavior in the release notes for 1.11. It would be good to add it, even if retrospectively, if this was indeed intentional.
Expected behavior
I'd expect one of the two things to happen:
BatchOperations.rename_table
is defined as an alias ofOperations.rename_table
and does the exact same thing_(PS: I did try looking at the
rel_1_10_4...rel_1_11_0
diff and commit 2aba0ada168d0047d54c7a08b0ffdde3102b716b looks like the most likely candidate for this issue, but I have yet to go much deeper than this)_To Reproduce
See https://github.com/stephenfin/alembic-issue-1453 for a minimal'ish reproducer.
Error
Versions.
mysql
Additional context
Have a nice day!