Database and migrations

Run foundation migrations before child:db:migrate. Applied filenames and SQL remain immutable. db:fresh initializes empty databases only. Model SQL belongs in child/app/migrations/sql/0000_goatmigrations/; application SQL belongs in 0001_childigrations/. Each child file executes in a transaction and is recorded by relative path. Compare isolated old/new schemas including existing child migrations; never compare an empty database to production. Review SQL, conversions, data and locks before deployment. Deployment verifies an encrypted backup before applying migrations.

goat run:script --path=@goatcms/herd/db/migrate.goat
goat run:script --path=@goatcms/herd/db/migration_generate.goat