File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,14 +75,17 @@ export function makeCurrentMigrationRunner(
7575 migrationsAreEquivalent =
7676 currentBodyMinified === previousBodyMinified ;
7777
78- // 4: if different
78+ // 3a: Run actions if the migrations are different OR if forced.
7979 if ( forceActions || ! migrationsAreEquivalent ) {
8080 await executeActions (
8181 parsedSettings ,
8282 shadow ,
8383 parsedSettings . beforeCurrent ,
8484 ) ;
85+ }
8586
87+ // 4: if different
88+ if ( ! migrationsAreEquivalent ) {
8689 // 4a: invert previous current; on success delete from graphile_migrate.current; on failure rollback and abort
8790 if ( previousBody ) {
8891 await reverseMigration ( lockingPgClient , previousBody ) ;
@@ -136,7 +139,7 @@ export function makeCurrentMigrationRunner(
136139 ) ;
137140 const interval = process . hrtime ( start ) ;
138141 const duration = interval [ 0 ] * 1e3 + interval [ 1 ] * 1e-6 ;
139- if ( ! migrationsAreEquivalent ) {
142+ if ( forceActions || ! migrationsAreEquivalent ) {
140143 await executeActions (
141144 parsedSettings ,
142145 shadow ,
You can’t perform that action at this time.
0 commit comments