4 ms·
This looks interesting. Do you know how it actually works? The readme simply says, "The basic idea is to perform the migration online while the system is live
by hamburglar 12y ago
This looks interesting. Do you know how it actually works? The readme simply says, "The basic idea is to perform the migration online while the system is live, without locking the table. In contrast to OAK and the facebook tool, we only use a copy table and triggers." What's the technique used to achieve that?
- dperfect 12y agoFrom what I understand, it creates a new table with the same structure as the existing table, runs your migrations on it, adds triggers to bring live changes in from the original table while copying (in batches) the records in the old table. Once everything is copied and updated with triggers, it swaps out the old table for the new one in an atomic operation.
- jipiboily 12y agoFrom what I understand/think, this is roughly: Create a new table, add triggers from old table to new table (with new column(s)), copy data, once everything is copied, switch the tables