How to use libsql features in migrations
Hey there, first time using sqlite here, AFAIK, you can't modify a sqlite column to, for instance, change its ON DELETE action from nothing to cascade. However, libsql mentions this in its docs https://github.com/tursodatabase/libsql/blob/main/libsql-sqlite3/doc/libsql_extensions.md#altering-columns which makes me think there is actually a way to do this without using a mirror table.
I understand that running 'drizzle-kit generate' with schema changes like this one will output a warning saying you should write the migration yourself. What I don't understand is where should I do this. Should I edit my 0001_etc.sql file and write my code there?
If i do that, and write something like
libsql> ALTER TABLE emails ALTER COLUMN user_id TO user_id INT
then I get an error because libsql> is not recognized, but then what is the point of writing driver: "turso"
in my config file? isn't the turso driver what tells drizzle it can use libSQL features?GitHub
libsql/libsql-sqlite3/doc/libsql_extensions.md at main · tursodatab...
libSQL is a fork of SQLite that is both Open Source, and Open Contributions. - tursodatabase/libsql
0 Replies