Skip to content

destroy

Drop all managed schema objects from the target database. Prompts for confirmation before making changes unless --auto-approve is given.

Terminal window
nschema destroy

When a state store is configured it is refreshed after the teardown.

  • -s, --scope <name> — limit the teardown to specific namespaces. May be repeated.
  • -y, --auto-approve — skip the confirmation prompt. Required for non-interactive runs.
  • --no-lock — skip taking the state-store lock for this run. Use it only when you’ve coordinated access by other means (for example you already hold the lock via nschema lock acquire).

Like a declined apply, a declined destroy makes no changes and exits 1.