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 - Drop what the app owns and migrate (dev, test, acc only) 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           - Drop what the app owns and migrate (dev, test, acc only)
  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)

Drops what the application owns and migrates again (BOU-585).

Refuses outside dev, test and acc, on another machine without --allow-remote, and when something it does not own depends on what it would drop. The profile is resolved by detect-environment, the function the connection uses, so clojure -M:migrate reset is guarded as well as bb db:reset (BOU-258). Then it shows what it will drop and asks for the database's name, on a terminal only: piping yes answers nothing.

Drops what the application owns and migrates again (BOU-585).

Refuses outside dev, test and acc, on another machine without
--allow-remote, and when something it does not own depends on what it
would drop. The profile is resolved by `detect-environment`, the function
the connection uses, so `clojure -M:migrate reset` is guarded as well as
`bb db:reset` (BOU-258). Then it shows what it will drop and asks for the
database's name, on a terminal only: piping `yes` answers nothing.
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

tty?clj

(tty?)

Whether a person can answer the prompt. A console is not enough: newer JDKs return one with stdin redirected. isTerminal is asked reflectively because the baseline JDK lacks it.

Whether a person can answer the prompt. A console is not enough: newer
JDKs return one with stdin redirected. isTerminal is asked reflectively
because the baseline JDK lacks it.
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