From 133a6f4fe4f1ec1e80011301607264beab12c852 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 11 Nov 2020 14:33:47 +0100 Subject: Document the constraints we test against Signed-off-by: Joas Schilling --- lib/private/DB/MigrationService.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/private/DB') diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php index 30fef6d7ef7..852ee8b701f 100644 --- a/lib/private/DB/MigrationService.php +++ b/lib/private/DB/MigrationService.php @@ -551,6 +551,23 @@ class MigrationService { $this->markAsExecuted($version); } + /** + * Naming constraints: + * - Tables names must be 30 chars or shorter (27 + oc_ prefix) + * - Column names must be 30 chars or shorter + * - Index names must be 30 chars or shorter + * - Sequence names must be 30 chars or shorter + * - Primary key names must be set or the table name 23 chars or shorter + * + * Data constraints: + * - Columns with "NotNull" can not have empty string as default value + * - Columns with "NotNull" can not have number 0 as default value + * + * @param Schema $sourceSchema + * @param Schema $targetSchema + * @param int $prefixLength + * @throws \Doctrine\DBAL\Exception + */ public function ensureOracleIdentifierLengthLimit(Schema $sourceSchema, Schema $targetSchema, int $prefixLength) { $sequences = $targetSchema->getSequences(); -- cgit v1.2.3