Comparator extends Comparator
Compares two Schemas and returns an instance of SchemaDiff.
Table of Contents
Properties
- $databasePlatform : AbstractPlatform|null
Methods
- __construct() : mixed
- Comparator constructor.
- diffColumn() : 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.
- diffTable() : false|TableDiff|TableDiff
- Returns the difference between the tables $fromTable and $toTable.
Properties
$databasePlatform
protected
AbstractPlatform|null
$databasePlatform
Methods
__construct()
Comparator constructor.
public
__construct([AbstractPlatform|null $platform = null ]) : mixed
Parameters
- $platform : AbstractPlatform|null = null
diffColumn()
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
diffColumn(Column $column1, Column $column2) : array<string|int, mixed>
Parameters
- $column1 : Column
- $column2 : Column
Return values
array<string|int, mixed>diffTable()
Returns the difference between the tables $fromTable and $toTable.
public
diffTable(Table $fromTable, Table $toTable) : false|TableDiff|TableDiff
If there are no differences this method returns the boolean false.
Parameters
- $fromTable : Table
- $toTable : Table