-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
[BUG] Columns are scrambled when using TEXT data type #126
Comments
@wurst-hans Hello, thanks for report! Will try to see ASAP. |
BeMySlaveDarlin
pushed a commit
to BeMySlaveDarlin/migrations
that referenced
this issue
Nov 30, 2021
BeMySlaveDarlin
pushed a commit
to BeMySlaveDarlin/migrations
that referenced
this issue
Nov 30, 2021
BeMySlaveDarlin
pushed a commit
to BeMySlaveDarlin/migrations
that referenced
this issue
Nov 30, 2021
3 tasks
BeMySlaveDarlin
pushed a commit
to BeMySlaveDarlin/migrations
that referenced
this issue
Nov 30, 2021
BeMySlaveDarlin
pushed a commit
to BeMySlaveDarlin/migrations
that referenced
this issue
Nov 30, 2021
BeMySlaveDarlin
pushed a commit
to BeMySlaveDarlin/migrations
that referenced
this issue
Nov 30, 2021
BeMySlaveDarlin
pushed a commit
to BeMySlaveDarlin/migrations
that referenced
this issue
Nov 30, 2021
Jeckerson
added a commit
that referenced
this issue
Dec 7, 2021
…umn-name #126 - Fix update column name alg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems to be a critical bug. Stumbled upon this, because a live project crashed after trying to apply database changes.
How to reproduce
Assume there is a table:
Run
generate
command. The migration file looks like:Add a new column right after
column_1
Use
generate
command again to track differences (even if it creates a full dump again, which is not ideal IMO), which would create a migration file like this:As you can see, this file looks good, new column is added in correct place. But when I run this migration on production database now, the column
column_3
is replaced withcolumn_2
.First notice:
column_3
is not dropped, it is renamed to new column (because in my test casecolumn_2
contains exactly the same content that has been stored incolumn_3
before).Second notice: In my test, that happens on
TEXT
columns only, but not when usingINT
columns.BTW: I would appreciate if there is a quick fix, because this is a common use case for us.
The text was updated successfully, but these errors were encountered: