Merge pull request #22652 from nextcloud/backport/22643/stable19
[stable19] Fix installing on Oracle
This commit is contained in:
commit
b7bcf5c019
|
@ -59,7 +59,9 @@ class Version18000Date20190920085628 extends SimpleMigrationStep {
|
|||
$table->addColumn('displayname', Type::STRING, [
|
||||
'notnull' => true,
|
||||
'length' => 255,
|
||||
'default' => '',
|
||||
// Will be overwritten in postSchemaChange, but Oracle can not save
|
||||
// empty strings in notnull columns
|
||||
'default' => 'name',
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -513,6 +513,11 @@ class MigrationService {
|
|||
if ((!$sourceTable instanceof Table || !$sourceTable->hasColumn($thing->getName())) && \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 name "' . $table->getName() . '"."' . $thing->getName() . '" is NotNull, but has empty string or null as default.');
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($table->getIndexes() as $thing) {
|
||||
|
|
Loading…
Reference in New Issue