mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Fix typos and empty tabs
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
0257315c34
commit
82c33be744
1 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue