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
(-main & args)Main CLI entry point for migration commands.
Main CLI entry point for migration commands.
CLI options specification for migration commands.
CLI options specification for migration commands.
(cmd-create migration-name opts)Creates a new migration file.
Creates a new migration file.
(cmd-init opts)Initializes the migration system.
Initializes the migration system.
(cmd-migrate opts)Runs all pending migrations.
Runs all pending migrations.
(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).
(cmd-rollback opts)Rolls back the last migration.
Rolls back the last migration.
(exit! status)Wrapper around System/exit to keep CLI dispatch testable.
Wrapper around System/exit to keep CLI dispatch testable.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |