Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename multiple columns in an auto migration #457

Merged
merged 4 commits into from
Mar 9, 2022

Conversation

dantownsend
Copy link
Member

Fixes #417

If the auto migration manager detected that multiple columns were renamed in a single operation, it could get confused.

For example:

# Old version of table
class TableA(Table):
    a1 = Varchar()
    a2 = Varchar()

# New version of table
class TableA(Table):
    b1 = Varchar()
    b2 = Varchar()

In the above example, a1 could now be b1 or b2. Likewise, a2 could be b1 or b2. Things are quite complex, which is how a bug crept in.

If we already know that column A was renamed to column B, don't then ask if column C was also renamed to column B.
@dantownsend dantownsend added the bug Something isn't working label Mar 9, 2022
@dantownsend dantownsend merged commit 3219b72 into master Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename column causes persistent rename column prompt in migration manager
1 participant