Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-11-11 16:33:47 +0300
committerJoas Schilling <coding@schilljs.com>2021-03-31 11:21:17 +0300
commit133a6f4fe4f1ec1e80011301607264beab12c852 (patch)
tree4785a8471b2c22b7b219ccc73bae3601391f97fe /lib/private
parentc98cab137cf6a4c2aee6af4f125537083e0b7a6f (diff)
Document the constraints we test against
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/DB/MigrationService.php17
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();