| Methods |
public
|
__call(string $method, list<mixed> $args): SchemaDiff
|
#
|
public
static
|
__callStatic(string $method, list<mixed> $args): SchemaDiff
|
#
|
private
|
doCompareSchemas(Schema $fromSchema, Schema $toSchema): SchemaDiff
Returns a SchemaDiff object containing the differences between the schemas $fromSchema and $toSchema.
Returns a SchemaDiff object containing the differences between the schemas $fromSchema and $toSchema.
This method should be called non-statically since it will be declared as non-static in the next major release.
Throws
|
#
|
public
|
compare(Schema $fromSchema, Schema $toSchema): SchemaDiff
Deprecated
Use non-static call to {@see compareSchemas()} instead.
Throws
|
#
|
private
|
isAutoIncrementSequenceInSchema(Schema $schema, Sequence $sequence): bool
|
#
|
public
|
diffSequence(Sequence $sequence1, Sequence $sequence2): bool
|
#
|
public
|
diffTable(Table $fromTable, Table $toTable): TableDiff|false
Returns the difference between the tables $fromTable and $toTable.
Returns the difference between the tables $fromTable and $toTable.
If there are no differences this method returns the boolean false.
Deprecated
Use {@see compareTables()} and, optionally, {@see TableDiff::isEmpty()} instead.
Throws
|
#
|
public
|
compareTables(Table $fromTable, Table $toTable): TableDiff
Compares the tables and returns the difference between them.
Compares the tables and returns the difference between them.
Throws
|
#
|
private
|
detectRenamedColumns(
array<string, Column> &$addedColumns,
array<string, Column> &$removedColumns,
): array<string, Column>
Try to find columns that only changed their name, rename operations maybe cheaper than add/drop
however ambiguities…
Try to find columns that only changed their name, rename operations maybe cheaper than add/drop
however ambiguities between different possibilities should not lead to renaming at all.
Throws
|
#
|
private
|
detectRenamedIndexes(array<string, Index> &$addedIndexes, array<string, Index> &$removedIndexes): array<string, Index>
Try to find indexes that only changed their name, rename operations maybe cheaper than add/drop
however ambiguities…
Try to find indexes that only changed their name, rename operations maybe cheaper than add/drop
however ambiguities between different possibilities should not lead to renaming at all.
|
#
|
public
|
diffColumn(Column $column1, Column $column2): string[]
Returns the difference between the columns
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.
Deprecated
Use {@see columnsEqual()} instead.
|
#
|
public
|
compareSchemas(Schema $fromSchema, Schema $toSchema): SchemaDiff
|
#
|