4 ms·
You still suffer a brief outage though, no? We thought about this a lot in a previous life of mine, and the problem with what I think you describe is that once
by deathanatos 13y ago
You still suffer a brief outage though, no? We thought about this a lot in a previous life of mine, and the problem with what I think you describe is that once everything was said and done, you'd be left with:
ALTER TABLE RENAME foo foo_old;
-- You're down right here!
ALTER TABLE RENAME foo_new foo;
-- …and we're back!
(For those new to MySQL, ALTER TABLE is immune to transactions.) Admittedly, it might be less than applying the migration direct, so it might be worthwhile. (We just ate the downtime, and tested things to avoid surprises.)