Open exaby73 opened 2 months ago
I've filed https://github.com/tursodatabase/libsql/issues/1547 to ask about this - looking at some sqld code, they seem to be considering legacy_alter_table
in some places. So I hope it's an oversight and that the pragma is supposed to work. Let's see what happens upstream.
Thanks for chasing this :)
Speaking of Turso, how is hrana saving migration information? I used to see a schema migrations table when I was using drift with postgres, but it seems like it's not there in Turso. I tried running .tables
in the shell and SELECT * FROM sqlite_master WHERE type='table'
, both gives me one the tables I created, but no schema migrations table. Is this intended?
sqlite, and libsql by extension, have a user_version
pragma saved in the header of the database file. Drift is using that as a simple version number to record which schema is currently active. You can view and update it manually with pragma user_version
.
Describe the bug
Hello!. Thank you for the support for hrana and by extension, Turso. I am facing an error with an alter migration. Here are the steps to reproduce:
This was my previous row
Then changed to the following since I wanted to explicitly save the date in UTC
I have created a migration like so in
onUpgrade
This causes the following error to be thrown