You’ll set up a release process that lets you build freely and ship safely: work in development, check in staging (and in a preview per pull request), and move to production with a review of exactly what changes, a backup first, and a way back. You’ll use: environments, API keys, previews, promote, backups.

The setup

1. Create the environments

Project → Environments → New environment: staging, copying from development; then production, copying from staging. Each comes with its own publishable and secret keys, shown once: store them in each deployment’s secret store. Make production the default environment if you want requests that name no environment to go there.

2. Point each app at its environment

A key only works with its own environment, so a staging key in a production build fails loudly instead of silently mixing data.

3. Things promote doesn’t copy

Set these up in each environment by hand, once:

4. A preview per pull request

In CI, when a pull request opens, create a preview from staging and give its keys to the preview deployment. It expires by itself. See Previews.

5. Release: review, back up, promote

1

Promote development → staging, with a review

Promote from development to staging. The dry run lists added and changed definitions, the table changes that will be applied, those that need review (renames, type changes, removals, which promote never applies), and anything blocked.
2

Test staging

Run your end-to-end tests and the rule tests from Testing rules.
3

Back up production

Backups → Back up now, named after the release, and pin it.
4

Promote staging → production

Review the dry run again: it should be what you saw in staging.
5

Watch

For the next hour, watch Activity → Overview and Errors, and compare with before.
In code, with a secret key that can manage both environments:

6. Changes promote won’t make

Renames, type changes and removals are listed, not applied, so a release can never drop a column that holds real data. Do them deliberately:
  1. Add the new column (promoted automatically).
  2. Deploy app code that writes both old and new.
  3. Copy existing values over (a flow, or the SQL editor after a backup).
  4. Deploy code that reads only the new column.
  5. Remove the old column in each environment, by hand, last.
See Migrations and history.

7. Rolling back

Alternatively: everything as code

If you’d rather review changes in pull requests than in Studio, keep your definitions in your repository with infrastructure as code and deploy the same code to each environment from CI (CI/CD). The same rules apply: secrets, keys and data stay per environment.

Promote

What it copies and how.

Production readiness

Before you launch.