summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-09-07 20:55:50 +0200
committerGitHub <noreply@github.com>2020-09-07 20:55:50 +0200
commit34d2ae25f78964f50254e2a238840aa561f03fe8 (patch)
tree2c78a04697d86389638484183c6e7e15b3f06972 /lib
parent0e6344f5438f019b9d1da89f853ce82270464ba3 (diff)
parent50230847ce47133dd0be170457f24bf5e6ac4ab8 (diff)
downloadnextcloud-server-34d2ae25f78964f50254e2a238840aa561f03fe8.tar.gz
nextcloud-server-34d2ae25f78964f50254e2a238840aa561f03fe8.zip
Merge pull request #22643 from nextcloud/bugfix/noid/fix-installing-on-oracle
Fix installing on Oracle
Diffstat (limited to 'lib')
-rw-r--r--lib/private/DB/MigrationService.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php
index 42204dd155a..cd0280162d3 100644
--- a/lib/private/DB/MigrationService.php
+++ b/lib/private/DB/MigrationService.php
@@ -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) {