[SOLVED] How to add new column?
Hello!
Any ideas how to add a new column to an existing table?
What I did so far:
1. Updated the schema to add a new column:
2. Generated migration files, and it did create the correct SQL statement, but for some reason I don't understand, it is not applicable:
3. Running the migration fails with:
I'm using
'@libsql/client'
connected to Turso.3 Replies
Based on this https://sqlite.org/lang_altertable.html#alter_table_add_column
I think you should be safe to delete the first part of your migration up to
statement-breakpoint
and run it againThanks @Angelelz ! Removing
--> statement-breakpoint
made it possible to be applied. Wondering why is this the default behavior since adding a column is the most basic use case for a migration...I have no idea, maybe out of abundance of caution? Maybe an old version of SQL had problems with it?