Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major createMigrationTable() performance improvement #75

Conversation

dt-creasis
Copy link
Contributor

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.

…iguration - the schema would be rebuilt on every request if the migration table already exists.
@@ -477,7 +477,11 @@ public function createMigrationTable()

return true;
}
return false;
else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@stof
Copy link
Member

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants