summaryrefslogtreecommitdiff
path: root/vendor/doctrine/dbal/src/Platforms/SQLite
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2026-10-18 00:08:23 +0200
committerpolo <ordipolo@gmx.fr>2026-10-18 00:10:03 +0200
commit05e38eadbeb3de19e5b26003c2b401e00bb71df4 (patch)
treecf48350b69cfce92de6f3a0e03eb0876931c7077 /vendor/doctrine/dbal/src/Platforms/SQLite
parent32843e50aa981f190bdb4fbc9adbeacc06fdf775 (diff)
downloadAppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.tar.gz
AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.tar.bz2
AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.zip
sortie de vendor du dépôt, oubli dans config-template.ini
Diffstat (limited to 'vendor/doctrine/dbal/src/Platforms/SQLite')
-rw-r--r--vendor/doctrine/dbal/src/Platforms/SQLite/Comparator.php52
1 files changed, 0 insertions, 52 deletions
diff --git a/vendor/doctrine/dbal/src/Platforms/SQLite/Comparator.php b/vendor/doctrine/dbal/src/Platforms/SQLite/Comparator.php
deleted file mode 100644
index f27e1b4..0000000
--- a/vendor/doctrine/dbal/src/Platforms/SQLite/Comparator.php
+++ /dev/null
@@ -1,52 +0,0 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Platforms\SQLite;
6
7use Doctrine\DBAL\Platforms\SQLitePlatform;
8use Doctrine\DBAL\Schema\Comparator as BaseComparator;
9use Doctrine\DBAL\Schema\Table;
10use Doctrine\DBAL\Schema\TableDiff;
11
12use function strcasecmp;
13
14/**
15 * Compares schemas in the context of SQLite platform.
16 *
17 * BINARY is the default column collation and should be ignored if specified explicitly.
18 */
19class Comparator extends BaseComparator
20{
21 /** @internal The comparator can be only instantiated by a schema manager. */
22 public function __construct(SQLitePlatform $platform)
23 {
24 parent::__construct($platform);
25 }
26
27 public function compareTables(Table $oldTable, Table $newTable): TableDiff
28 {
29 return parent::compareTables(
30 $this->normalizeColumns($oldTable),
31 $this->normalizeColumns($newTable),
32 );
33 }
34
35 private function normalizeColumns(Table $table): Table
36 {
37 $table = clone $table;
38
39 foreach ($table->getColumns() as $column) {
40 $options = $column->getPlatformOptions();
41
42 if (! isset($options['collation']) || strcasecmp($options['collation'], 'binary') !== 0) {
43 continue;
44 }
45
46 unset($options['collation']);
47 $column->setPlatformOptions($options);
48 }
49
50 return $table;
51 }
52}