diff options
-rw-r--r-- | lib/private/DB/MigrationService.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php index b228308cbfe..2b129edca26 100644 --- a/lib/private/DB/MigrationService.php +++ b/lib/private/DB/MigrationService.php @@ -27,7 +27,6 @@ */ namespace OC\DB; -use Doctrine\DBAL\Exception\DriverException; use Doctrine\DBAL\Platforms\OraclePlatform; use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\DBAL\Schema\Index; @@ -424,10 +423,10 @@ class MigrationService { foreach ($toBeExecuted as $version) { try { $this->executeStep($version, $schemaOnly); - } catch (DriverException $e) { + } catch (\Exception $e) { // The exception itself does not contain the name of the migration, // so we wrap it here, to make debugging easier. - throw new \Exception('Database error when running migration ' . $to . ' for app ' . $this->getApp(), 0, $e); + throw new \Exception('Database error when running migration ' . $version . ' for app ' . $this->getApp() . PHP_EOL. $e->getMessage(), 0, $e); } } } @@ -607,7 +606,6 @@ class MigrationService { // we will NOT detect invalid length if the column is not modified if (($sourceColumn === null || $sourceColumn->getLength() !== $thing->getLength() || $sourceColumn->getType()->getName() !== Types::STRING) && $thing->getLength() > 4000 && $thing->getType()->getName() === Types::STRING) { - var_dump($sourceColumn === null, $sourceColumn->getLength(), $thing->getLength(), $sourceColumn->getName()); throw new \InvalidArgumentException('Column "' . $table->getName() . '"."' . $thing->getName() . '" is type String, but exceeding the 4.000 length limit.'); } } |