Re-seed after a schema migration
Problem: a migration changed the schema; you want the existing seed data updated, not rebuilt from scratch.
Solution:
# See exactly what changed vs the stored snapshotdbsprout diff --file schema_v2.sql
# Apply only the diff-driven updatesdbsprout generate --incremental --file schema_v2.sqlDiff against a specific snapshot instead of the latest with
--snapshot <hash-prefix>, and emit machine-readable output with
dbsprout diff --format json.
Why it works: diff reports added/removed tables, column type and
nullability changes, and FK/index changes. generate --incremental maps each
change to a targeted update rule (new column → backfill, new table →
generate, dropped table → skip) and leaves unaffected data untouched.