Closed AndyM84 closed 4 months ago
Proposed new code:
if (!$isDropping) {
$db->queryStored(MStrings::InstallMigTable);
$db->prepareStored(MStrings::InsertMigration, [':fileName' => MStrings::MigFile])->execute();
} else {
$db->queryStored(MStrings::DropMigTable);
}
Currently if a drop run fails, all subsequent drop runs will also fail to remove any tables on account of the migrator continuing to check for the file:
In reality, neither of those actions should be performed if the migration is a 'drop', and it shouldn't perform the migration table DROP command here at all, since it is added as a separate migration step at the end of the queue.