sequelize-auto-migrations icon indicating copy to clipboard operation
sequelize-auto-migrations copied to clipboard

Wrap migrations in transaction

Open Scimonster opened this issue 5 years ago • 3 comments

Each migration should ideally run in a transaction, to avoid a situation of a migration being partially applied.

Scimonster avatar Jun 03 '19 13:06 Scimonster

I like this suggestion. One thing to note, though, is that while this is possible with Postgres, it may not be supported on other popular RDBMS platforms.

PaulMest avatar Jun 24 '19 07:06 PaulMest

I tested with mysql and sqlite

On Mon, Jun 24, 2019, 10:28 AM Paul Mestemaker [email protected] wrote:

I like this suggestion. One thing to note, though, is that while this is possible with Postgres, it may not be supported on other popular RDBMS platforms.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/flexxnn/sequelize-auto-migrations/issues/52?email_source=notifications&email_token=AAVSCERAHZYJ57ZGQOFARZTP4BZRXA5CNFSM4HSIAOGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYMA2SY#issuecomment-504892747, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVSCEUZFJ74U3IUVRG7Z4DP4BZRXANCNFSM4HSIAOGA .

Scimonster avatar Jun 24 '19 10:06 Scimonster

Looks like MySQL just started supporting Atomic DDL in 8.0. 👍

PaulMest avatar Jun 24 '19 13:06 PaulMest