Before the app runs, one Makefile check compares the operation log in git with the local database’s schema. When the log is newer, make db-sync brings the database forward. When the database is newer, make db-capture appends the change to the log.
- Exercised
identify --expectmigrate --from-dumpdriftAddColumnCreateIndex
- Stack
- make + git + PostgreSQL
- Chapters
- 4
Retrofit imports a schema dump into its operation log, writes the migrations that add and then validate a foreign key between existing tables, then backs the change out and reapplies it. Every script is generated, none is written by hand.
- Exercised
importSealAddForeignKeyValidateConstraint
- Stack
- Flyway + PostgreSQL
- Chapters
- 4
Retrofit imports a populated database, preserves its rows through column and table refactors, and pulls changes made directly in PostgreSQL back into the log. Retrofit starts from a database dump, a set of migration scripts, or zero; this demo starts from the dump.
- Exercised
importop adddriftDecomposeTableSeal
- Stack
- PostgreSQL
- Chapters
- 4