Comparator
public class Comparator
www.doctrine-project.org
Method Summary | |
---|---|
void | addColumnPlatformOptionCheck(string optionName) |
SchemaDiff | compare(Schema fromSchema, Schema toSchema) Returns a SchemaDiff object containing the differences between the schemas $fromSchema and $toSchema. |
static SchemaDiff | compareSchemas(Schema fromSchema, Schema toSchema) |
array | diffColumn(Column column1, Column column2) Returns the difference between the fields $field1 and $field2. |
bool | diffForeignKey(ForeignKeyConstraint key1, ForeignKeyConstraint key2) |
bool | diffIndex(Index index1, Index index2) Finds the difference between the indexes $index1 and $index2. |
void | diffSequence(Sequence sequence1, Sequence sequence2) |
bool|TableDiff | diffTable(Table table1, Table table2) Returns the difference between the tables $table1 and $table2. |
public void addColumnPlatformOptionCheck(string optionName)
public SchemaDiff compare(Schema fromSchema, Schema toSchema)
Returns a SchemaDiff object containing the differences between the schemas $fromSchema and $toSchema.
The returned diferences are returned in such a way that they contain the operations to change the schema stored in $fromSchema to the schema that is stored in $toSchema.
public static SchemaDiff compareSchemas(Schema fromSchema, Schema toSchema)
public array diffColumn(Column column1, Column column2)
Returns the difference between the fields $field1 and $field2.
If there are differences this method returns $field2, otherwise the boolean false.
public bool diffForeignKey(ForeignKeyConstraint key1, ForeignKeyConstraint key2)
public bool diffIndex(Index index1, Index index2)
Finds the difference between the indexes $index1 and $index2.
Compares $index1 with $index2 and returns $index2 if there are any differences or false in case there are no differences.
public void diffSequence(Sequence sequence1, Sequence sequence2)
public bool|TableDiff diffTable(Table table1, Table table2)
Returns the difference between the tables $table1 and $table2.
If there are no differences this method returns the boolean false.
Compare to Schemas and return an instance of SchemaDiff