Running drizzle-kit push:sqlite with Turso
Hi, I ran into an issue today trying to update my schema on Turso using drizzle and Sqlite.
I'm running the command:
drizzle-kit push:sqlite
I then get this error: LibsqlError: SQLITE_UNKNOWN: SQLite error: table isak.dev_burger has 11 columns but 10 values were supplied
I was like, okey I need to check how to solve this. But the main issue here is that this command deletes all my data.
Does anyone know why that happens?
Thanks!Solution:Jump to solution
So it seems like drizzle did not generate correct sql (from my knowledge). I ended up writing this to insert data only into the columns that existed before
``
ALTER TABLE
isak.dev_burger RENAME TO
isak.dev_burger_old`;--> statement-breakpoint
...1 Reply
Solution
So it seems like drizzle did not generate correct sql (from my knowledge). I ended up writing this to insert data only into the columns that existed before