2 ms·
Easy: don't do that. Always make your code compatible with the old and new schema. Migrate the database separately. Then after the migration, remove the code t
by tantalor 7y ago
Easy: don't do that.
Always make your code compatible with the old and new schema. Migrate the database separately. Then after the migration, remove the code that supports the old schema.
- aledalgrande 7y agoI think every DB change should be done like you suggest. An example I worked on recently: - migrate DB and create new field - deploy code for writing into such field (not read yet), in parallel with old field - backfill data migration for older records - deploy code with feature flag to read new field in workflows, but still write to both fields - switch read feature flag on - make sure everything works for a few weeks - switch write feature flag to only use new field