Commit 58e44161 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Fix bug in DropSchemaSQLCollector dropping tables before sequences which can...

Fix bug in DropSchemaSQLCollector dropping tables before sequences which can cause constraint errors
parent cfcad35f
...@@ -137,6 +137,6 @@ class DropSchemaSqlCollector implements Visitor ...@@ -137,6 +137,6 @@ class DropSchemaSqlCollector implements Visitor
*/ */
public function getQueries() public function getQueries()
{ {
return array_merge($this->_constraints, $this->_tables, $this->_sequences); return array_merge($this->_constraints, $this->_sequences, $this->_tables);
} }
} }
...@@ -53,7 +53,7 @@ class SchemaSqlCollectorTest extends \PHPUnit_Framework_TestCase ...@@ -53,7 +53,7 @@ class SchemaSqlCollectorTest extends \PHPUnit_Framework_TestCase
$sql = $schema->toDropSql($platformMock); $sql = $schema->toDropSql($platformMock);
$this->assertEquals(array("fk", "tbl", "tbl", "seq"), $sql); $this->assertEquals(array("fk", "seq", "tbl", "tbl"), $sql);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment