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
CLI entry point for database seeding.
Usage: clojure -M -m wagoe.platform.shell.database.cli-seed [path]
Defaults to resources/seeds/dev.edn. Invoked by bb db:seed, which cannot
open a JDBC connection itself (libs/tools is pure Babashka), so it shells out
here — the same arrangement bb migrate uses for cli-migrations.
CLI entry point for database seeding. Usage: clojure -M -m wagoe.platform.shell.database.cli-seed [path] Defaults to resources/seeds/dev.edn. Invoked by `bb db:seed`, which cannot open a JDBC connection itself (libs/tools is pure Babashka), so it shells out here — the same arrangement `bb migrate` uses for cli-migrations.
Database migration management using Migratus.
This namespace provides functions to manage database schema migrations:
Migrations are discovered from the application's migrations/ directory and
from any library manifests published on the classpath.
Database migration management using Migratus. This namespace provides functions to manage database schema migrations: - Run pending migrations (up) - Rollback migrations (down) - Check migration status - Create new migrations Migrations are discovered from the application's `migrations/` directory and from any library manifests published on the classpath.
Loads a seed file into the active database.
The pure parts — validation, kebab->snake conversion, plan building — live in
wagoe.platform.core.database.seed. This namespace owns the I/O: reading the
file, acquiring the datasource, and executing the inserts.
Loads a seed file into the active database. The pure parts — validation, kebab->snake conversion, plan building — live in `wagoe.platform.core.database.seed`. This namespace owns the I/O: reading the file, acquiring the datasource, and executing the inserts.
Widen timestamp columns declared without a timezone to ones that carry it.
A column declared TIMESTAMP stores wall-clock time and no zone, so what it
means depends on who reads it. The JVM flag from BOU-431 makes every Wagoe
process agree that the zone is UTC, and this makes the column say so itself —
so a report, a psql session or another service reads the same moment.
Only PostgreSQL and H2 need it. MySQL's TIMESTAMP already normalises to UTC
on the way in and out (its zone-less type is DATETIME), and SQLite has no
timezone concept at all — its column types are storage-class affinities.
Idempotent: a column that already carries a zone is left alone, so this is safe to run from a migration and from a boot-time schema check.
Widen timestamp columns declared without a timezone to ones that carry it. A column declared `TIMESTAMP` stores wall-clock time and no zone, so what it means depends on who reads it. The JVM flag from BOU-431 makes every Wagoe process agree that the zone is UTC, and this makes the column say so itself — so a report, a psql session or another service reads the same moment. Only PostgreSQL and H2 need it. MySQL's `TIMESTAMP` already normalises to UTC on the way in and out (its zone-less type is `DATETIME`), and SQLite has no timezone concept at all — its column types are storage-class affinities. Idempotent: a column that already carries a zone is left alone, so this is safe to run from a migration and from a boot-time schema check.
Validation functions for database contexts and configurations.
Context validation functions check data structure conformity including protocol satisfaction, which requires access to the DBAdapter protocol from the shell adapters layer.
Validation functions for database contexts and configurations. Context validation functions check data structure conformity including protocol satisfaction, which requires access to the DBAdapter protocol from the shell adapters layer.
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 |