News for hackers. Stuff that matters.
Re:Rails migrations with no downtime by lgierth on Monday February 13, 2012 @01:57PM (#3586844)
At SoundCloud we developed Large Hadron Migrator [1] to work around the problem of locked tables with ALTER and MySQL. It creates a table with the new schema, copies the data from the "old" table to the new one in chunks (utilizing INSERT IGNORE and triggers) and then switches the two tables. The switching is not yet atomic, as there was a bug with RENAME TABLE.

[1] https://github.com/soundcloud/large-hadron-migrator

Edit: URL

There are no comments on this comment yet.