You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have renamed and added a few date columns. Up migration is correct, but down migration drops the column instead of renaming back. This could cause some problems.
The problem here is that we only consider something as renamed if there is exactly one candidate column (same type, different name), but you are adding two and renaming one, and when you do it the other way, there are 3 candidate columns for the removed one. I am not sure if it's a good idea to lift this restriction and always do it for the first match - it wouldn't be much better I guess, as this would be dependent on the column order and you might not rename the first one.
I will try to respect the up schema diff when detecting the renamings in down diff, I guess that could work for this particular case.
Describe the bug
I have renamed and added a few date columns. Up migration is correct, but down migration drops the column instead of renaming back. This could cause some problems.
Migration:
Stack trace
N/A
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Column should be renamed back instead of dropping
Additional context
N/A
Versions
The text was updated successfully, but these errors were encountered: