apply

command
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Command go applies the chain of plans.json (tests/dbspec/plans.json; create-from-empty and rename-table-and-column) to one database with the Go engine (docs/spec/plans.md "Apply"). action is one of the following:

  • apply-first: applies only the first plan of the chain.
  • apply: applies the whole chain.
  • stop: applies the whole chain, and stops after statement 1 of the second plan has run.
  • recover: finishes an interrupted plan.
  • rollback: rolls back the last plan in history.

stdout gets one result line: "ok" on success, "stopped" when stop halted, apply error is "error <code>". Other errors are written to stderr and exit with 1.

Usage: go run ./packages/go/internal/dbspec/apply <apply-first|apply|stop|recover|rollback|lock-wait> <mysql|postgres|sqlite> <uri> <plans.json>

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL