|
@@ 246-250 (lines=5) @@
|
| 243 |
|
// migration exists |
| 244 |
|
|
| 245 |
|
// fail if it was already executing or already done |
| 246 |
|
if ($existingMigrationData['status'] == Migration::STATUS_STARTED) { |
| 247 |
|
// commit to release the lock |
| 248 |
|
$conn->commit(); |
| 249 |
|
throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it is already executing"); |
| 250 |
|
} |
| 251 |
|
if ($existingMigrationData['status'] == Migration::STATUS_DONE) { |
| 252 |
|
// commit to release the lock |
| 253 |
|
$conn->commit(); |
|
@@ 251-255 (lines=5) @@
|
| 248 |
|
$conn->commit(); |
| 249 |
|
throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it is already executing"); |
| 250 |
|
} |
| 251 |
|
if ($existingMigrationData['status'] == Migration::STATUS_DONE) { |
| 252 |
|
// commit to release the lock |
| 253 |
|
$conn->commit(); |
| 254 |
|
throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it was already executed"); |
| 255 |
|
} |
| 256 |
|
if ($existingMigrationData['status'] == Migration::STATUS_SKIPPED) { |
| 257 |
|
// commit to release the lock |
| 258 |
|
$conn->commit(); |
|
@@ 256-260 (lines=5) @@
|
| 253 |
|
$conn->commit(); |
| 254 |
|
throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it was already executed"); |
| 255 |
|
} |
| 256 |
|
if ($existingMigrationData['status'] == Migration::STATUS_SKIPPED) { |
| 257 |
|
// commit to release the lock |
| 258 |
|
$conn->commit(); |
| 259 |
|
throw new \Exception("Migration '{$migrationDefinition->name}' can not be $action as it was already skipped"); |
| 260 |
|
} |
| 261 |
|
|
| 262 |
|
// do not set migration start date if we are skipping it |
| 263 |
|
$migration = new Migration( |