Re:Using the expand and contract pattern for schema changes
by manmal on Monday November 10, 2025 @11:05AM
(#45877260)
In the step where writes are added, from the client to the new schema instance, how does this work when writes depend on existing data, when the existing data hasn’t even been copied? Constrains like foreign keys will prevent this from working, no?
[ Parent
| on HN ]
Re:Using the expand and contract pattern for schema changes
by sarchertech on Monday November 10, 2025 @11:50AM
(#45877836)
You wouldn’t enable foreign key constraints until you finish backfilling the old data in that case. Or you do it in phases where you do all of these steps and migrate the dependency first.