Comparator extends Comparator
Compares two Schemas and returns an instance of SchemaDiff.
not part of public core API.
Table of Contents
Properties
- $databasePlatform : AbstractPlatform
- $platform : AbstractPlatform
Methods
- __construct() : mixed
- compareSchemas() : SchemaDiff
- compareTables() : TableDiff
- Returns the difference between the tables $fromTable and $toTable.
- doctrineDbalMajorThreeDiffColumn() : array<string|int, string>
- Returns the difference between the columns
- typo3DiffColumn() : array<string|int, mixed>
- 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.
- columnsEqual() : bool
Properties
$databasePlatform
protected
AbstractPlatform
$databasePlatform
$platform
protected
AbstractPlatform
$platform
Methods
__construct()
public
__construct(AbstractPlatform $platform) : mixed
Parameters
- $platform : AbstractPlatform
compareSchemas()
public
compareSchemas(Schema $oldSchema, Schema $newSchema) : SchemaDiff
Parameters
- $oldSchema : Schema
- $newSchema : Schema
Return values
SchemaDiffcompareTables()
Returns the difference between the tables $fromTable and $toTable.
public
compareTables(Table $oldTable, Table $newTable) : TableDiff
If there are no differences this method returns the boolean false.
Parameters
- $oldTable : Table
- $newTable : Table
Return values
TableDiffdoctrineDbalMajorThreeDiffColumn()
Returns the difference between the columns
public
doctrineDbalMajorThreeDiffColumn(Column $column1, Column $column2) : array<string|int, string>
Use columnsEqual() instead.
If there are differences this method returns the changed properties as a string array, otherwise an empty array gets returned.
Parameters
- $column1 : Column
- $column2 : Column
Return values
array<string|int, string> —Note: cloned from doctrine/dbal 3.7.1
typo3DiffColumn()
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.
public
typo3DiffColumn(Column $column1, Column $column2) : array<string|int, mixed>
Parameters
- $column1 : Column
- $column2 : Column
Tags
Return values
array<string|int, mixed>columnsEqual()
protected
columnsEqual(Column $column1, Column $column2) : bool
Parameters
- $column1 : Column
- $column2 : Column