Open Haaxor1689 opened 6 days ago
Upon some further investigation on a fresh local DB, it all seems to work, just the production turso DB I'm connecting to does not want to get fixed by push.
Also I was getting a warning about the table needing to be dropped because it's not null and missing a default value when I tried adding a new column although the column definition was orderIndex: integer('orderIndex').default(0).notNull()
Update: I've found a workaround. With strict
and verbose
flags enabled, I was able to see the SQL that the drizzle-kit is trying to apply and then manually apply relevant queries myself directly.
What version of
drizzle-orm
are you using?0.31.2
What version of
drizzle-kit
are you using?0.22.7
Describe the Bug
On previous drizzle version there was this bug with sqlite integer field in boolean mode did not handle default value correctly so I used
0 as never
as a workaround. Now that it correctly handles false for a default value, drizzle-kit push wants to apply SQL commands to the database, (supposedly) successfully finishes and then running push shows the same SQL again.Old schema on older drizzle version:
New schema on current drizzle version:
SQL generated by push (seen with --verbose):
Expected behavior
It should not detect this as a change OR fix whatever it is detecting as a change and work again properly.
Environment & setup
No response