Doctrine\DBAL\Schema\Comparator
Compare to Schemas and return an instance of SchemaDiff
- Author: Benjamin Eberlei <kontakt@beberlei.de>
- Copyright: Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
- License: http://ez.no/licenses/new_bsd New BSD License
Synopsis
class Comparator
{
- // methods
- public static SchemaDiff compareSchemas()
- public SchemaDiff compare()
- private void isAutoIncrementSequenceInSchema()
- public void diffSequence()
- public bool|TableDiff diffTable()
- private void detectColumnRenamings()
- public bool diffForeignKey()
- public array diffColumn()
- public bool diffIndex()
Methods
private
- detectColumnRenamings() — 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.
- isAutoIncrementSequenceInSchema()
public
- compare() — Returns a SchemaDiff object containing the differences between the schemas $fromSchema and $toSchema.
- compareSchemas()
- diffColumn() — Returns the difference between the fields $field1 and $field2.
- diffForeignKey()
- diffIndex() — Finds the difference between the indexes $index1 and $index2.
- diffSequence()
- diffTable() — Returns the difference between the tables $table1 and $table2.