Transactions between migrations in sequelize

For example i've got 3 migrations file. i know how to use transactions inside migrations, but how can create transaction in first file of migration and commit it in the last. is there any configs or i have to use CLS?

Upvotes: 2

Views: 1242

Answers (1)

João Pinto
João Pinto

Reputation: 1998

Sequelize does not support having a transaction that spans multiple migrations. If you want that behaviour you should include everything in one migration (since one migration represents an atomic operation) and use a transaction.

Upvotes: 2

Related Questions