• Sergi de Pablos's avatar
    Fix dropping foreign key multiple times with test · 59bea6bc
    Sergi de Pablos authored
    In some cases the Comparator class returns multiple drops for the same foreign key.
    Specifically, in case you have two tables, A & B, with A having a foreign key FK
    referencing B, if you drop table B, the resulting diff shows this FK twice,
    once on the diff->orphanedForeignKeys array as we're deleting B, and another on
    the diff->changedTables array as table A is also being modified. As a result of this you
    get the DROP FOREIGN KEY instruction twice in the final SQL.
    59bea6bc
Name
Last commit
Last update
..
Synchronizer Loading commit data...
Visitor Loading commit data...
AbstractAsset.php Loading commit data...
AbstractSchemaManager.php Loading commit data...
Column.php Loading commit data...
ColumnDiff.php Loading commit data...
Comparator.php Loading commit data...
Constraint.php Loading commit data...
DB2SchemaManager.php Loading commit data...
DrizzleSchemaManager.php Loading commit data...
ForeignKeyConstraint.php Loading commit data...
Index.php Loading commit data...
MySqlSchemaManager.php Loading commit data...
OracleSchemaManager.php Loading commit data...
PostgreSqlSchemaManager.php Loading commit data...
SQLServerSchemaManager.php Loading commit data...
Schema.php Loading commit data...
SchemaConfig.php Loading commit data...
SchemaDiff.php Loading commit data...
SchemaException.php Loading commit data...
Sequence.php Loading commit data...
SqliteSchemaManager.php Loading commit data...
Table.php Loading commit data...
TableDiff.php Loading commit data...
View.php Loading commit data...