2 ms·
We have an in-house migrations tool. It has a base schema and then plays migration files of raw SQL queries. When the playlist gets to taking too long, we refor
by sethammons 9y ago
We have an in-house migrations tool. It has a base schema and then plays migration files of raw SQL queries. When the playlist gets to taking too long, we reform the base schema and reset the playlist.
We have to think through all schema and data migrations due to the volume of data we have, both being ingested and being stored. And then we have to plan around the schema to be forwards and backwards compatible with the application or applications that use that datastore, allowing apps to update their usage out of band. And we have to do all this while ensuring as close to zero downtime as possible. Using raw SQL allows us to not worry about obfuscated complexity; we know exactly what will be ran. And for anything that might be rolled back, we have that ready to be ran. Sometimes that is not just doing the opposite queries.