Skip to content

Commit 32ede54

Browse files
committed
Limit missing primary key fail to new tables
This will work on CI so devs notice it when they install the app for testing, and at the same time existing faulty tables don't break the upgrade to 24 Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 84ae070 commit 32ede54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/DB/MigrationService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ public function ensureOracleConstraints(Schema $sourceSchema, Schema $targetSche
634634
if ($isUsingDefaultName && \strlen($table->getName()) - $prefixLength >= 23) {
635635
throw new \InvalidArgumentException('Primary index name on "' . $table->getName() . '" is too long.');
636636
}
637-
} elseif (!$primaryKey instanceof Index) {
637+
} elseif (!$primaryKey instanceof Index && !$sourceTable instanceof Table) {
638638
throw new \InvalidArgumentException('Table "' . $table->getName() . '" has no primary key and therefor will not behave sane in clustered setups.');
639639
}
640640
}

0 commit comments

Comments
 (0)