‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Database\Schema\Comparator Class Reference
Inheritance diagram for TYPO3\CMS\Core\Database\Schema\Comparator:

Public Member Functions

 __construct (protected AbstractPlatform $platform)
 compareSchemas (Schema $oldSchema, Schema $newSchema)
 compareTables (Table $oldTable, Table $newTable)
 typo3DiffColumn (Column $column1, Column $column2)
string[] doctrineDbalMajorThreeDiffColumn (Column $column1, Column $column2)

Protected Member Functions

 columnsEqual (Column $column1, Column $column2)

Protected Attributes

AbstractPlatform $databasePlatform

Detailed Description

Compares two Schemas and returns an instance of SchemaDiff.

not part of public core API.

Definition at line 39 of file Comparator.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Database\Schema\Comparator::__construct ( protected AbstractPlatform  $platform)

Definition at line 43 of file Comparator.php.

Member Function Documentation

◆ columnsEqual()

TYPO3\CMS\Core\Database\Schema\Comparator::columnsEqual ( Column  $column1,
Column  $column2 
‪: Remove this override after blocking issues has been resolved in the methods Comparator::typo3DiffColumn() and Comparator::doctrineDbalMajorThreeDiffColumn().
See also
Comparator::typo3DiffColumn() blocker, see comments
Comparator::doctrineDbalMajorThreeDiffColumn() blocker, see comments

Definition at line 80 of file Comparator.php.

References TYPO3\CMS\Core\Database\Schema\Comparator\typo3DiffColumn().

◆ compareSchemas()

TYPO3\CMS\Core\Database\Schema\Comparator::compareSchemas ( Schema  $oldSchema,
Schema  $newSchema 

Definition at line 49 of file Comparator.php.

References TYPO3\CMS\Core\Database\Schema\SchemaDiff\ensure().

◆ compareTables()

TYPO3\CMS\Core\Database\Schema\Comparator::compareTables ( Table  $oldTable,
Table  $newTable 

Returns the difference between the tables $fromTable and $toTable.

If there are no differences this method returns the boolean false.

Definition at line 59 of file Comparator.php.

References TYPO3\CMS\Core\Database\Schema\TableDiff\ensure().

◆ doctrineDbalMajorThreeDiffColumn()

string [] TYPO3\CMS\Core\Database\Schema\Comparator::doctrineDbalMajorThreeDiffColumn ( Column  $column1,
Column  $column2 

Returns the difference between the columns

If there are differences this method returns the changed properties as a string array, otherwise an empty array gets returned.

‪Use {
See also
columnsEqual()} instead.

Note: cloned from doctrine/dbal 3.7.1

Definition at line 139 of file Comparator.php.

Referenced by TYPO3\CMS\Core\Database\Schema\Comparator\typo3DiffColumn().

◆ typo3DiffColumn()

TYPO3\CMS\Core\Database\Schema\Comparator::typo3DiffColumn ( Column  $column1,
Column  $column2 

Returns the difference between the columns $column1 and $column2 by first checking the doctrine diffColumn. Extend the Doctrine method by taking into account MySQL TINY/MEDIUM/LONG type variants.

‪Move the column length override for MariaDB/MySQL to the extended platform classes, when the the workaround here can be removed and `AbstractPlatform::columnsEqual() used. Currently blocked by the used Comparator::doctrineDbalMajorThreeDiffColumn() code which compares differently than the new platform code of doctrine. See the todo regarding the platform options in that method.
See also
Comparator::doctrineDbalMajorThreeDiffColumn() blocker

Definition at line 106 of file Comparator.php.

References TYPO3\CMS\Core\Database\Schema\Comparator\doctrineDbalMajorThreeDiffColumn().

Referenced by TYPO3\CMS\Core\Database\Schema\Comparator\columnsEqual().

Member Data Documentation

◆ $databasePlatform

AbstractPlatform TYPO3\CMS\Core\Database\Schema\Comparator::$databasePlatform

Definition at line 41 of file Comparator.php.