Migrations Required
Change the schema only with migrations
Every schema change is a numbered migration file in version control. Nobody changes a shared database by hand.
How to do it
Use a migration tool, such as Flyway, Liquibase, Alembic, Prisma Migrate or the framework's own. Each file runs once, in order, and the database records which ran. The deploy runs pending migrations before the new code starts.
How to check
Build a fresh database from the migrations alone. Its schema matches production exactly, compared with a schema dump.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers data playbook: https://agentwranglers.se/playbook/data/migrations/versioned-migrations.