You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some databases support DDL in transactions, and for those it's almost strictly better for migrations to be all-or-nothing, as in:
BEGIN TRANSACTION;
CREATETABLEsome_table (...);
CREATEINDEXsome_table_idx (...);
COMMIT TRANSACTION;
It would be nice to have the created files have BEGIN TRANSACTION at the top for Postgres.
While the quick fix might be just adding the lines (maybe having them commented out), a more general one might be allowing the specification of a static template for up/down migration migrations, then I can just add the file, make sure to point to it in my config and then when I make a migration it will have the bits I want in it.
The text was updated successfully, but these errors were encountered:
Thanks @mmkal -- I've been getting along just fine with migrator by using the BEGIN and COMMIT, and will switch to using singleTransaction -- have used migrator on a couple of projects now and it's fantastic, thanks for all the hard work!
Some databases support DDL in transactions, and for those it's almost strictly better for migrations to be all-or-nothing, as in:
It would be nice to have the created files have
BEGIN TRANSACTION
at the top for Postgres.While the quick fix might be just adding the lines (maybe having them commented out), a more general one might be allowing the specification of a static template for up/down migration migrations, then I can just add the file, make sure to point to it in my config and then when I make a migration it will have the bits I want in it.
The text was updated successfully, but these errors were encountered: