Skip to main content

The dependency is the declaration

An app that imports a driver gets a database. Nothing else is required — no config, no dashboard step, no connection string.
Ship that and the build says:

Isolation

Each app connects as its own role, app_<slug>. No app can reach another app’s data, and this is enforced at the database rather than by convention.

Migrations

Put them in release, which runs once per deploy, before any traffic:
Never fold a migration into start. It re-runs on every cold start and every scale-out instance, concurrently.

Looking at the data

One read-only statement at a time. The CLI is for looking, not for migrating.

Keeping the database you already have

urlFrom names a secret, not a URL. Bay provisions nothing, touches nothing, and only needs to know that a value exists under that name and reached the revision.

Deleting an app

The database and the bucket are kept. The data outlives the app on purpose.