Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Major createMigrationTable() performance improvement #75

wants to merge 2 commits into


None yet
2 participants

dt-creasis commented Jun 7, 2012

In the createMigrationTable() method in Configuration, the schema is re-created every time the method is called if the migration table already exists.

We were trying to run a fairly large set of migrations across multiple databases and this method is called many times, resulting in lots of createSchema() requests which really slows the migrations down.

Now it's only ever called once per database inside this method greatly improving performance.

@dt-creasis dt-creasis Fix performance issues with the createMigrationTable() method in Conf…
…iguration - the schema would be rebuilt on every request if the migration table already exists.

@stof stof commented on an outdated diff Jun 7, 2012

@@ -477,7 +477,11 @@ public function createMigrationTable()
return true;
- return false;
+ else {

stof Jun 7, 2012


no need to use else here as the if returns (exactly as it was done previously)


stof commented Aug 18, 2014

Thank you @dtrethewey.

@stof stof closed this in 1a9dffa Aug 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment