nschema apply
Compute the plan and apply it to the target database. Prompts for confirmation before making
changes unless --auto-approve is given.
nschema applynschema apply --plan-file tonight.nplan # apply exactly what plan --out savedOptions
Section titled “Options”apply accepts every plan option, plus:
--auto-approve— skip the confirmation prompt and apply immediately. Required for non-interactive runs (CI, ECS tasks).--plan-file <path>— replay a plan saved byplan --out, executing exactly that plan instead of computing a fresh one (Terraform’sapply <planfile>). The saved plan already fixes its scope, desired schema, and destructive-action policy, so those inputs are ignored — and the*.sqlfiles need not be present. A live database to write to is still required, and you’re still prompted for confirmation unless--auto-approveis given.
After a successful apply
Section titled “After a successful apply”If a state store is configured, the resulting schema is captured to it after a successful apply, so later offline plans can run against that snapshot.
Deployment scripts (inline PRE/POST DEPLOYMENT blocks) run on
every apply, before and after the migration respectively.