Skip to content

Commit

Permalink
Merge pull request #2272 from CakeDC/issue/fix-post-flight-check
Browse files Browse the repository at this point in the history
Move postFlighCheck to be called before commit transaction
  • Loading branch information
dereuromark authored Apr 27, 2024
2 parents 3b8d3bd + 6d30f35 commit 6e89ab9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Phinx/Migration/Manager/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ public function executeMigration(MigrationInterface $migration, string $directio
// Record it in the database
$this->getAdapter()->migrated($migration, $direction, date('Y-m-d H:i:s', $startTime), date('Y-m-d H:i:s', time()));

$migration->postFlightCheck();

// commit the transaction if the adapter supports it
if ($this->getAdapter()->hasTransactions()) {
$this->getAdapter()->commitTransaction();
}

$migration->postFlightCheck();
}

/**
Expand Down

0 comments on commit 6e89ab9

Please sign in to comment.