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

Public Member Functions

 __construct (AbstractPlatform $platform=null)
 
bool Doctrine DBAL Schema TableDiff TYPO3 CMS Core Database Schema TableDiff diffTable (Table $fromTable, Table $toTable)
 
array diffColumn (Column $column1, Column $column2)
 

Protected Attributes

AbstractPlatform $databasePlatform
 

Detailed Description

Compares two Schemas and returns an instance of SchemaDiff.

Definition at line 33 of file Comparator.php.

Constructor & Destructor Documentation

◆ __construct()

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

Comparator constructor.

Parameters
\Doctrine\DBAL\Platforms\AbstractPlatform$platform

Definition at line 44 of file Comparator.php.

Member Function Documentation

◆ diffColumn()

array TYPO3\CMS\Core\Database\Schema\Comparator::diffColumn ( 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.

Parameters
\Doctrine\DBAL\Schema\Column$column1
\Doctrine\DBAL\Schema\Column$column2
Returns
‪array

Definition at line 107 of file Comparator.php.

◆ diffTable()

bool Doctrine DBAL Schema TableDiff TYPO3 CMS Core Database Schema TableDiff TYPO3\CMS\Core\Database\Schema\Comparator::diffTable ( Table  $fromTable,
Table  $toTable 
)

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

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

Parameters
\Doctrine\DBAL\Schema\Table$fromTable
\Doctrine\DBAL\Schema\Table$toTable
Returns
‪bool|\Doctrine\DBAL\Schema\TableDiff|\TYPO3\CMS\Core\Database\Schema\TableDiff
Exceptions

Definition at line 59 of file Comparator.php.

Member Data Documentation

◆ $databasePlatform

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

Definition at line 37 of file Comparator.php.