Deploy database migrations safely

Reduce the risk of changing production data without turning migrations into a separate release process. Tokay rehearses each migration against a writable copy of your data, shows you what changed, and snapshots the managed database before any migration reaches production.

Last updated

AI agent? Start with llms.txt.

Problems appear before production changes

You do not have to learn about a bad migration from the live database. During deployment, Tokay runs the migration against a copy that has the same data shape as production and compares the schema before and after.

Under Normal release safety, changes judged safe continue through the deploy. A migration that fails rehearsal cannot be confirmed, so it never reaches production.

Risky or uncertain changes wait for you

Under Normal release safety, consequential data decisions stay with you. If rehearsal finds a risky or uncertain change, the deploy pauses and shows what will run, what changed during rehearsal, and any data at risk.

Your production data is unchanged while the deploy waits. Tokay snapshots the managed database before any migration runs against it, so there is always a restore point you can use.

Your normal migration tools still drive the change

Migration safety does not add another configuration system to maintain. Tokay detects the commands already used by Prisma, Django, Rails, and other supported tools. When a command needs confirmation, we show it before it runs.

Projects can require confirmation for every migration or allow safe changes to continue unattended, with an override available for individual Services.

AI written migrations keep a human gate

A coding agent like Claude Code or Codex can deploy routine schema changes, but it cannot approve a migration that release safety pauses. Through Tokay's GraphQL API, the agent submits and deploys the migration, while Tokay runs the rehearsal and sends you the evidence when confirmation is needed.

See database migrations for the full behavior.

Deploy your first app on Tokay's permanent free plan without a credit card.

Related guides