Slide 8
Slide 8 text
Solution: choose between two approaches:
“State” and “Migrations”
State
• a set of declarative SQL scripts
describe how the database should
be, with 1 script per database
entity (e.g. Person.sql,
Customer.sql, Account.sql,
Address.sql)
• A migration generator takes care of
generating migrations for every
change and for every environment,
through state comparison
Migrations
• a set of imperative SQL scripts
describe how the database should
change
• Migrations are hand-written by
human developers, and a migration
handler applies them across every
environment, usually through
meta-tables that keep track of
already-applied migrations