Liking cljdoc? Tell your friends :D

wagoe.platform.shell.database.cli-migrations

CLI commands for database migration management.

Usage: clojure -M -m wagoe.platform.shell.database.cli-migrations [command] [options]

Commands: migrate - Run all pending migrations rollback - Roll back the last migration status - Show migration status create <name> - Create a new migration file reset - Reset database (rollback all and reapply) init - Initialize migration system

CLI commands for database migration management.

Usage:
  clojure -M -m wagoe.platform.shell.database.cli-migrations [command] [options]

Commands:
  migrate         - Run all pending migrations
  rollback        - Roll back the last migration
  status          - Show migration status
  create <name>   - Create a new migration file
  reset           - Reset database (rollback all and reapply)
  init            - Initialize migration system
raw docstring

-mainclj

(-main & args)

Main CLI entry point for migration commands.

Main CLI entry point for migration commands.
sourceraw docstring

cli-optionsclj

CLI options specification for migration commands.

CLI options specification for migration commands.
sourceraw docstring

cmd-createclj

(cmd-create migration-name opts)

Creates a new migration file.

Creates a new migration file.
sourceraw docstring

cmd-initclj

(cmd-init opts)

Initializes the migration system.

Initializes the migration system.
sourceraw docstring

cmd-migrateclj

(cmd-migrate opts)

Runs all pending migrations.

Runs all pending migrations.
sourceraw docstring

cmd-resetclj

(cmd-reset opts)

Resets the database (WARNING: destructive operation).

Refuses outside a disposable environment. This is the authoritative guard: it runs in the same JVM as the connection and resolves the environment with detect-environment, the same function the connection uses. bb db:reset shells out to here, so a check only in libs/tools could be bypassed by calling clojure -M:migrate reset directly — which previously had no environment check of any kind (BOU-258).

Resets the database (WARNING: destructive operation).

Refuses outside a disposable environment. This is the authoritative guard:
it runs in the same JVM as the connection and resolves the environment with
`detect-environment`, the same function the connection uses. `bb db:reset`
shells out to here, so a check only in libs/tools could be bypassed by
calling `clojure -M:migrate reset` directly — which previously had no
environment check of any kind (BOU-258).
sourceraw docstring

cmd-rollbackclj

(cmd-rollback opts)

Rolls back the last migration.

Rolls back the last migration.
sourceraw docstring

cmd-statusclj

(cmd-status opts)

Shows migration status.

Shows migration status.
sourceraw docstring

exit!clj

(exit! status)

Wrapper around System/exit to keep CLI dispatch testable.

Wrapper around System/exit to keep CLI dispatch testable.
sourceraw docstring

(print-help)

Prints CLI help message.

Prints CLI help message.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close