|
@@ 202-206 (lines=5) @@
|
| 199 |
|
|
| 200 |
|
// fail if it was not executing |
| 201 |
|
|
| 202 |
|
if (!is_array($existingMigrationData)) { |
| 203 |
|
// commit to release the lock |
| 204 |
|
$conn->commit(); |
| 205 |
|
throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be ended as it is not found"); |
| 206 |
|
} |
| 207 |
|
|
| 208 |
|
if (($existingMigrationData['status'] != APIMigration::STATUS_STARTED) && !$force) { |
| 209 |
|
// commit to release the lock |
|
@@ 359-363 (lines=5) @@
|
| 356 |
|
$stmt = $conn->executeQuery($sql, array($migration->name)); |
| 357 |
|
$existingMigrationData = $stmt->fetch(\PDO::FETCH_ASSOC); |
| 358 |
|
|
| 359 |
|
if (!is_array($existingMigrationData)) { |
| 360 |
|
// commit immediately, to release the lock and avoid deadlocks |
| 361 |
|
$conn->commit(); |
| 362 |
|
throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be resumed as it is not found"); |
| 363 |
|
} |
| 364 |
|
|
| 365 |
|
// migration exists |
| 366 |
|
|