How should I do custom migrations?
I am trying to do migrations in sqlite and sometimes drizzle will leave a comment in the migration file saying it cannot add constraints to existing columns, I understand it is necessary but it'd be appreciated if there was better documentation on how to achieve these things without leaving drizzle too much.
I feel like the whole migration process from drizzle-kit is not that clear and its quite hard to understand what are its limitations. For instance, I had a 0005_etc migration file written by me (I guess this is necessary to keep it version-controllable) and it used
Now, trying to run my 0006_etc file I am getting
I feel like the whole migration process from drizzle-kit is not that clear and its quite hard to understand what are its limitations. For instance, I had a 0005_etc migration file written by me (I guess this is necessary to keep it version-controllable) and it used
BEGIN TRANSACTION;Now, trying to run my 0006_etc file I am getting
SQL_MANY_STATEMENTS and if I add statement-breakpoints I get SQLite error: cannot start a transaction within a transaction I am unsure about whether it has to do with this file or the previous one. Some of the questions that I am now getting:- Does running
run all files? how does it decide which to run?drizzle-kit migrate - Why can't it point me to the file/statement that is erroring?
- how are
--> statement-breakpoints used? - Can I turn on/off foreign keys during migrations?