Skip to content
MyAppBuilder
BetaGuide

Database migrations

A migration brings your database in line with your app's entities and fields. MyAppBuilder never changes a database without showing you the plan first. This feature is in beta .

Beta — ready to use, but some details may still change.

A migration brings your database in line with your app's entities and fields. MyAppBuilder never changes a database without showing you the plan first. This feature is in beta.

Plan → review → apply or export → verify

  1. Plan. Sync Database in the Data view (or the wizard's Migration step) inspects the database, compares it with the app and prepares a plan. Planning never alters the database.
  2. Review. The review shows Migration v33 → v34, the database and version, the target namespace, every change (for example + Create inspections), the data that will be imported, the risk level and Existing customer-owned tables modified. Review SQL shows the exact SQL, headed Generated for: PostgreSQL 16.
  3. Apply or export. - Apply Migration (project admins only) runs the plan with the migration credential. You confirm by typing the target database name, and the server refuses to run the plan against any database other than the one it was planned for (its fingerprint). - Download SQL gives you a file such as migration_v34_postgresql.sql. Choose I will apply these changes myself, run it with your own tools, then select Verify Database.
  4. Verify. MyAppBuilder re-inspects the database and marks it synced only when the structure matches. The editor never marks a migration as done without this server-side check.

Risk levels

LevelMeaningApplied by MyAppBuilder
SAFEOnly additive changes in the managed namespaceYes
CAUTIONAdditive, but may lock or rewrite a large table, or transforms data. Provider warnings explain whyYes, after review
DESTRUCTIVEDrops, renames or type changesNever. Manual process only

Destructive changes are manual

When a plan is destructive there is no Apply button. Download the SQL, review it with whoever owns the database, take a backup, and apply it yourself in a maintenance window. Then verify.

Renames: expand first

Renaming an entity or field in the editor does not rename the table or column. When you really need a new physical name, do it in two steps: first add the new column or table and copy the data (expand), switch the app over, and only later remove the old one (contract) in a separate, reviewed change.

Rollback is separate

Restoring an earlier app version does not undo database migrations. Database changes are additive by design so older app versions keep working. To reverse a migration, write and review the reverse SQL yourself.

Schema versions

Each migration records the app schema version in the managed namespace. The Data view shows App schema 34 · Production 34 ✓ Synced, or Migration required when they differ.

Related

Was this helpful?