What's Migration
Motivation
When your code base need new schema to fit with new requirements while these could conflicts with current database. A strategy is needed to transform all data into new schema lossless. That's why we need migration.
Snapshot-based strategy
Snapshot based strategy calculates the delta of two versions of database as a whole.
Diff-based strategy
Diff based strategy calculates the changes of each commit, and convert it into migration scripts or raw SQL. Since the migration is represented as scripts for each commit, it's more convenient for code review, so it's always recommended.