top | item 9647306

(no title)

technoweenie | 10 years ago

Migrations stay pretty small. Most of them just add a column or index. We also have to make sure tables aren't too hot to migrate. See a previous post for more on that: http://githubengineering.com/using-mysql-performance-schema-...

It's also really important that migrations don't affect the running app code. New columns shouldn't be used yet. Removed columns or tables need to have all references removed first before running the migration. We confirm this with a deprecation helper that sends metrics to Graphite.

That's about all I can answer from the app side :)

discuss

order

tonyhb|10 years ago

Sweet, that makes sense. Thanks for answering!

Was assuming that a column rename would duplicate the column during the first migration — so that the old and new codebase would work correctly. I guess the only complication is that you need to keep track of which branches have been successfully rebased/merged to master so you can run the second cleanup migrations.

Thanks again!