4 ms·
yeah treating every schema change as a db migration might be our industry's worst anti-pattern. transactional ddl allows you to do stuff like: begin tran
by gfody 5y ago
yeah treating every schema change as a db migration might be our industry's worst anti-pattern. transactional ddl allows you to do stuff like:
begin tran
..refactor data, drop/create tables..
..create backwards-compatible views..
commit
..against a live database without risking consistency
- jjeaff 5y agoI would have very few cases where that works for me. Because I almost always need the database layer to continue to work for a time with both the old code and the new code update. Deployments usually roll out to pods a few at a time so changing the schema of a table suddenly will immediately throw errors all over the place.
- gfody 5y ago> Because I almost always need the database layer to continue to work for a time with both the old code and the new code update. that's what the backwards-compatible views are for