The problem is that if a developer creates a structural error in their migration file,
they will already be marked as executed and an not be rerun.
Signed-off-by: Joas Schilling <coding@schilljs.com>
$toSchema = $instance->changeSchema($this->output, function () use ($toSchema) {
return $toSchema ?: new SchemaWrapper($this->connection);
}, ['tablePrefix' => $this->connection->getPrefix()]) ?: $toSchema;
-
- $this->markAsExecuted($version);
}
if ($toSchema instanceof SchemaWrapper) {
$this->connection->migrateToSchema($targetSchema);
$toSchema->performDropTableCalls();
}
+
+ foreach ($toBeExecuted as $version) {
+ $this->markAsExecuted($version);
+ }
}
/**