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
Notice I altered table name from demo_user -> user to simulate table level conflict, similarly I altered password -> password_hash to simulate column level conflict.
5. Now run the generate command again:
drizzle-kit generate
drizzle-kit prompts to choose if user is new table or renamed from demo_user.
6. Check the migration file 0002_stormy_dreadnoughts.sql in my case:
ALTERTABLE"demo_user" RENAME TO "user";
Expected behavior
drizzle-kit should've prompted to resolve column conflicts (if password_hash renamed from password)
Generated migration file should've included
ALTERTABLE"user" RENAME COLUMN "password" TO "password_hash";
Environment & setup
This issue only occurs if we have table conflict as well. I have tested while only simulating column conflict and it worked as expected. I've been using drizzle-kit@^0.20.0 and this issue wasn't there. I observed this issue after updating to drizzle-kit@^0.21.2
The text was updated successfully, but these errors were encountered:
What version of
drizzle-orm
are you using?0.21.2
What version of
drizzle-kit
are you using?0.30.6
Describe the Bug
Simulate the column conflicts:
demo_table
:0001_opposite_thena.sql
in my case):Notice I altered table name from
demo_user
->user
to simulate table level conflict, similarly I alteredpassword
->password_hash
to simulate column level conflict.5. Now run the generate command again:
drizzle-kit prompts to choose if
user
is new table or renamed fromdemo_user
.6. Check the migration file
0002_stormy_dreadnoughts.sql
in my case:Expected behavior
password_hash
renamed frompassword
)Environment & setup
This issue only occurs if we have table conflict as well. I have tested while only simulating column conflict and it worked as expected. I've been using
drizzle-kit@^0.20.0
and this issue wasn't there. I observed this issue after updating todrizzle-kit@^0.21.2
The text was updated successfully, but these errors were encountered: