Plan

pawabase plan reads the environment and prints what a deploy would do. It writes nothing.

How comparison works

The server fills in defaults and ids, so the comparison asks only whether what you wrote is present in what the server returns (an empty value matches a missing one). That avoids false differences.

Deploy

Modes

Use merge when Studio is also used for some things. Use override only when code is the single source of truth.

What happens

  1. Everything is validated. If an env("…") is unset, nothing is sent.
  2. Definitions are applied in dependency order: roles, schemas, policies, tables, flows, routes, then events, webhooks, buckets and mail templates.
  3. After a table is created or changed, its database table is created or extended (columns are only added). Skip with --no-migrate.
  4. A summary lists what was created, changed and removed.

Safety

  • A secret key is required. deploy refuses without PAWABASE_API_KEY, and accepts only a secret key (pb_sk…) with the Deploy and configure preset.
  • Production asks first, even in merge mode.
  • Exit codes: 0 success, 1 a failure or a refusal, 2 when --yes was needed but not given.

After deploying

Open Studio: your table is under Data, your policy under Access → Policies, your flow under Logic → Flows. Check Activity for errors.

Roll back

Deploy the previous commit: git checkout <old> && pawabase deploy. Data isn’t rolled back (columns added stay); take a backup before risky changes.

Commands

Every option.

CI/CD

Deploy on merge.