DATABASE_URL is injected, and your migrations run before the
application starts.
You do not create the database, copy a connection string, or decide where the
migration step goes.
How the database is detected
Antideploy looks for a Postgres client in your dependencies:
If one is there, your app needs a database and gets one. If not, no database is
created, and you are not paying for something you never asked for.
The ordering that matters
Most deployment platforms give you a database and a connection string and leave the rest to you. The failure that follows is always the same: the container starts, the app queries a table that does not exist yet, and it crashes. Then the migration runs, and the next restart works. You get one deploy that looks broken for no reason. Antideploy runs migrations before the release, not after:1
The database is provisioned
A Postgres database, with
DATABASE_URL injected into the environment.2
Your migrations run against it
Using your project’s own migration tool. Prisma, Drizzle, Alembic, Django,
and the rest run the way they run locally.
3
Only then does the app start
If the migration fails, the deploy fails and the previous version stays up.
You do not get a window where the schema is half applied and the app is
serving traffic.
Redeploying reuses the existing database rather than creating a second one.
Your data survives every deploy.
Your connection string
DATABASE_URL is set in the environment. Read it the way you already do:
Node
Python
DATABASE_URL locally, it
works unchanged.
Confirming a migration landed
The dashboard includes a read-only browser for your database: tables, columns, and row counts. You can check that a migration applied without connecting a client or opening a tunnel.What you should know before relying on it
- One database per application. Not per branch, and there are no preview databases.
- No automatic point-in-time restore. If you need a copy of your data, take
one with
pg_dumpbefore deleting an application. - Postgres only. MySQL, MongoDB and Redis are not provisioned. You can still use them if they already exist somewhere: put the credentials in your environment variables and your app will pick them up.
If your app crashes on the first request
Almost always one of these:
The deployment status response carries the detected spec, warnings and hazards
as structured data, so the answer is usually there before you start guessing.
Deploy one
Connect a repository with an ORM in it and watch the database step run.