[BUG]: drizzle-kit push
with SQLite and check constraints always applies a change and errors if theres an index
#4574
Labels
bug
Something isn't working
Uh oh!
There was an error while loading. Please reload this page.
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.43.1
What version of
drizzle-kit
are you using?0.31.1
Other packages
@libsql/client@0.15.7
Describe the Bug
When using SQLite, running
drizzle-kit push
with schemas that include check constraints,drizzle-kit
always seems to try and apply a change the database. This causes an error when indexes exist.Minimal repro: https://codesandbox.io/p/devbox/stupefied-dubinsky-sx6zvs
Example schema:
First time running
push --verbose
:Running
push --verbose
again with no changes:Removing the
.unique()
and runningpush --verbose
:Running
push --verbose
again with no additional changes (this can be run N times and always does exactly the same thing):Removing the check constraint and running
push --verbose
then seemingly recreates everything:Running
push --verbose
from here correctly detects that there are no changes required:The text was updated successfully, but these errors were encountered: