-
Zero-downtime: Multiple releases of the code that understand different database schemas can simultaneously write to the database.
-
Triggers: Triggers are used to keep old and new schemas in sync while the application undergoes a rolling upgrade.
-
Expand-migrate-contract: The migration is performed in three phases. The expand phase creates new columns (and possibly tables), and triggers. The migrate phase moves data from the old column to the new column. The contract phase removes old columns (and possible tables), and triggers.
To demonstrate, run:
sh demo.sh