For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

arctl db migrate down

Page as Markdown

Roll back the N most-recent applied migrations for the selected source.

Undo the last N applied migrations, newest first, by running each migration’s .down.sql.

Migrations whose .down.sql raises (up-only / not-reversible migrations) will leave the schema_migrations row marked dirty after the failed rollback. Subsequent up invocations will refuse to run until the dirty marker is cleared with ‘arctl db migrate force V’, where V is the version named in the failure message.

Usage

arctl db migrate down N [flags]

Global flags

-h, --help                    Display help information for the command.
    --db-url string           PostgreSQL connection URL (defaults to value of AGENT_REGISTRY_DATABASE_URL env var)
    --registry-token string   Registry bearer token (defaults to value of ARCTL_API_TOKEN env var)
    --registry-url string     Registry URL (overrides ARCTL_API_BASE_URL env var; defaults to http://localhost:12121)

See also