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
My use case: I have written 7 different migrations, which each take around ~1 minute to run (so a total of 7 minutes). In that timespan, if the process is aborted, I do not want the entire progress to be discarded. Wrapping EACH migration in a transaction will enable the process to pick back up from the individual migration that failed (instead of re-running all 7 again).
Looking through #1379, it seems that Migrator::up wraps all the migrations into a single transaction. Would it be possible to expose a method (or perhaps a MigratorBuilder?) which will enable each individual migration to be run in a separate transaction?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My use case: I have written 7 different migrations, which each take around ~1 minute to run (so a total of 7 minutes). In that timespan, if the process is aborted, I do not want the entire progress to be discarded. Wrapping EACH migration in a transaction will enable the process to pick back up from the individual migration that failed (instead of re-running all 7 again).
Looking through #1379, it seems that
Migrator::up
wraps all the migrations into a single transaction. Would it be possible to expose a method (or perhaps aMigratorBuilder
?) which will enable each individual migration to be run in a separate transaction?Note: I am talking about Postgres here.
Beta Was this translation helpful? Give feedback.
All reactions