|
27 | 27 | */ |
28 | 28 | namespace OC\DB; |
29 | 29 |
|
30 | | -use Doctrine\DBAL\Exception\DriverException; |
31 | 30 | use Doctrine\DBAL\Platforms\OraclePlatform; |
32 | 31 | use Doctrine\DBAL\Platforms\PostgreSQL94Platform; |
33 | 32 | use Doctrine\DBAL\Schema\Index; |
@@ -424,10 +423,10 @@ public function migrate($to = 'latest', $schemaOnly = false) { |
424 | 423 | foreach ($toBeExecuted as $version) { |
425 | 424 | try { |
426 | 425 | $this->executeStep($version, $schemaOnly); |
427 | | - } catch (DriverException $e) { |
| 426 | + } catch (\Exception $e) { |
428 | 427 | // The exception itself does not contain the name of the migration, |
429 | 428 | // so we wrap it here, to make debugging easier. |
430 | | - throw new \Exception('Database error when running migration ' . $to . ' for app ' . $this->getApp(), 0, $e); |
| 429 | + throw new \Exception('Database error when running migration ' . $version . ' for app ' . $this->getApp() . PHP_EOL. $e->getMessage(), 0, $e); |
431 | 430 | } |
432 | 431 | } |
433 | 432 | } |
@@ -607,7 +606,6 @@ public function ensureOracleConstraints(Schema $sourceSchema, Schema $targetSche |
607 | 606 | // we will NOT detect invalid length if the column is not modified |
608 | 607 | if (($sourceColumn === null || $sourceColumn->getLength() !== $thing->getLength() || $sourceColumn->getType()->getName() !== Types::STRING) |
609 | 608 | && $thing->getLength() > 4000 && $thing->getType()->getName() === Types::STRING) { |
610 | | - var_dump($sourceColumn === null, $sourceColumn->getLength(), $thing->getLength(), $sourceColumn->getName()); |
611 | 609 | throw new \InvalidArgumentException('Column "' . $table->getName() . '"."' . $thing->getName() . '" is type String, but exceeding the 4.000 length limit.'); |
612 | 610 | } |
613 | 611 | } |
|
0 commit comments