From 05e38eadbeb3de19e5b26003c2b401e00bb71df4 Mon Sep 17 00:00:00 2001 From: polo Date: Sun, 18 Oct 2026 00:08:23 +0200 Subject: =?UTF-8?q?sortie=20de=20vendor=20du=20d=C3=A9p=C3=B4t,=20oubli=20?= =?UTF-8?q?dans=20config-template.ini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dbal/src/Platforms/MariaDBPlatform.php | 165 --------------------- 1 file changed, 165 deletions(-) delete mode 100644 vendor/doctrine/dbal/src/Platforms/MariaDBPlatform.php (limited to 'vendor/doctrine/dbal/src/Platforms/MariaDBPlatform.php') diff --git a/vendor/doctrine/dbal/src/Platforms/MariaDBPlatform.php b/vendor/doctrine/dbal/src/Platforms/MariaDBPlatform.php deleted file mode 100644 index d4082ae..0000000 --- a/vendor/doctrine/dbal/src/Platforms/MariaDBPlatform.php +++ /dev/null @@ -1,165 +0,0 @@ -quoteStringLiteral($databaseName); - - // The check for `CONSTRAINT_SCHEMA = $databaseName` is mandatory here to prevent performance issues - return <<getOldTable()->getQuotedName($this); - - $modifiedForeignKeys = $diff->getModifiedForeignKeys(); - - foreach ($this->getRemainingForeignKeyConstraintsRequiringRenamedIndexes($diff) as $foreignKey) { - if (in_array($foreignKey, $modifiedForeignKeys, true)) { - continue; - } - - $sql[] = $this->getDropForeignKeySQL($foreignKey->getQuotedName($this), $tableName); - } - - return $sql; - } - - /** - * {@inheritDoc} - */ - protected function getPostAlterTableIndexForeignKeySQL(TableDiff $diff): array - { - return array_merge( - parent::getPostAlterTableIndexForeignKeySQL($diff), - $this->getPostAlterTableRenameIndexForeignKeySQL($diff), - ); - } - - /** @return list */ - private function getPostAlterTableRenameIndexForeignKeySQL(TableDiff $diff): array - { - $sql = []; - - $tableName = $diff->getOldTable()->getQuotedName($this); - - $modifiedForeignKeys = $diff->getModifiedForeignKeys(); - - foreach ($this->getRemainingForeignKeyConstraintsRequiringRenamedIndexes($diff) as $foreignKey) { - if (in_array($foreignKey, $modifiedForeignKeys, true)) { - continue; - } - - $sql[] = $this->getCreateForeignKeySQL($foreignKey, $tableName); - } - - return $sql; - } - - /** - * Returns the remaining foreign key constraints that require one of the renamed indexes. - * - * "Remaining" here refers to the diff between the foreign keys currently defined in the associated - * table and the foreign keys to be removed. - * - * @param TableDiff $diff The table diff to evaluate. - * - * @return ForeignKeyConstraint[] - */ - private function getRemainingForeignKeyConstraintsRequiringRenamedIndexes(TableDiff $diff): array - { - $renamedIndexes = $diff->getRenamedIndexes(); - - if (count($renamedIndexes) === 0) { - return []; - } - - $foreignKeys = []; - - $remainingForeignKeys = array_diff_key( - $diff->getOldTable()->getForeignKeys(), - $diff->getDroppedForeignKeys(), - ); - - foreach ($remainingForeignKeys as $foreignKey) { - foreach ($renamedIndexes as $index) { - if ($foreignKey->intersectsIndexColumns($index)) { - $foreignKeys[] = $foreignKey; - - break; - } - } - } - - return $foreignKeys; - } - - /** {@inheritDoc} */ - public function getColumnDeclarationSQL(string $name, array $column): string - { - // MariaDb forces column collation to utf8mb4_bin where the column was declared as JSON so ignore - // collation and character set for json columns as attempting to set them can cause an error. - if ($this->getJsonTypeDeclarationSQL([]) === 'JSON' && ($column['type'] ?? null) instanceof JsonType) { - unset($column['collation']); - unset($column['charset']); - } - - return parent::getColumnDeclarationSQL($name, $column); - } - - protected function createReservedKeywordsList(): KeywordList - { - return new MariaDBKeywords(); - } -} -- cgit v1.2.3