diff options
author | Joas Schilling <coding@schilljs.com> | 2020-11-11 14:33:47 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-03-31 10:21:17 +0200 |
commit | 133a6f4fe4f1ec1e80011301607264beab12c852 (patch) | |
tree | 4785a8471b2c22b7b219ccc73bae3601391f97fe /lib/private/DB | |
parent | c98cab137cf6a4c2aee6af4f125537083e0b7a6f (diff) | |
download | nextcloud-server-133a6f4fe4f1ec1e80011301607264beab12c852.tar.gz nextcloud-server-133a6f4fe4f1ec1e80011301607264beab12c852.zip |
Document the constraints we test against
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/DB')
-rw-r--r-- | lib/private/DB/MigrationService.php | 17 |
1 files changed, 17 insertions, 0 deletions
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(); |