Skip to main content

Module migrate

Module migrate 

Source
Expand description

Runtime migrations.

apiplant has no hand-written migration files: the resource schemas are the desired state. On boot the migrator makes the database match them — idempotently. It creates missing tables and adds missing columns (an additive strategy that is safe to run on every start). Destructive changes (dropping/retyping columns) are intentionally left to the operator.

Functions§

migrate
Bring the database in line with every resource in the app.