Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-04-07 13:42:52 +0300
committerJoas Schilling <coding@schilljs.com>2022-04-07 13:42:52 +0300
commit82c33be744b1e9d85c780bce277c783c6d38e7bf (patch)
tree1a453cb40b08a8749eb8127f5d6019a1487aef87 /lib
parent0257315c3474a7e4e13af952c6191cedb6abcb99 (diff)
Fix typos and empty tabsfix/oracle-contrainst
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/DB/MigrationService.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php
index 2b129edca26..fb7b6b7472f 100644
--- a/lib/private/DB/MigrationService.php
+++ b/lib/private/DB/MigrationService.php
@@ -582,17 +582,17 @@ class MigrationService {
}
foreach ($table->getColumns() as $thing) {
- // If the table doesn't exists OR if the column doesn't exists in the table
+ // If the table doesn't exist OR if the column doesn't exist in the table
if (!$sourceTable instanceof Table || !$sourceTable->hasColumn($thing->getName())) {
if (\strlen($thing->getName()) > 30) {
throw new \InvalidArgumentException('Column name "' . $table->getName() . '"."' . $thing->getName() . '" is too long.');
}
-
+
if ($thing->getNotnull() && $thing->getDefault() === ''
&& $sourceTable instanceof Table && !$sourceTable->hasColumn($thing->getName())) {
throw new \InvalidArgumentException('Column "' . $table->getName() . '"."' . $thing->getName() . '" is NotNull, but has empty string or null as default.');
}
-
+
if ($thing->getNotnull() && $thing->getType()->getName() === Types::BOOLEAN) {
throw new \InvalidArgumentException('Column "' . $table->getName() . '"."' . $thing->getName() . '" is type Bool and also NotNull, so it can not store "false".');
}
@@ -601,7 +601,7 @@ class MigrationService {
} else {
$sourceColumn = $sourceTable->getColumn($thing->getName());
}
-
+
// If the column was just created OR the length changed OR the type changed
// we will NOT detect invalid length if the column is not modified
if (($sourceColumn === null || $sourceColumn->getLength() !== $thing->getLength() || $sourceColumn->getType()->getName() !== Types::STRING)