Public interface for lib's users.
Public interface for lib's users.
(explain args)
Show raw SQL or human-readable description for a migration by number.
Available options:
:number - Integer number of the migration to explain. (required)
:direction - Direction of the migration to explain, can be forward
(default) or backward
. (optional)
:format - Format of explanation, can be sql
(default) or human
. (optional)
:migrations-dir - Path to directory containing migration files relative to the resources
dir. Default: db/migrations
. (optional)
Show raw SQL or human-readable description for a migration by number. Available options: :number - Integer number of the migration to explain. (required) :direction - Direction of the migration to explain, can be `forward` (default) or `backward`. (optional) :format - Format of explanation, can be `sql` (default) or `human`. (optional) :migrations-dir - Path to directory containing migration files relative to the `resources` dir. Default: `db/migrations`. (optional)
(help args)
Help information for all commands of automigrate tool.
Available options: :cmd - Command name to display help information for a specific command. (optional)
Help information for all commands of automigrate tool. Available options: :cmd - Command name to display help information for a specific command. (optional)
(list {:keys [jdbc-url-env-var] :as args})
Show the list of existing migrations with status.
Available options:
:jdbc-url - JDBC url for the database connection. Default: get from DATABASE_URL
env var. (optional)
:jdbc-url-env-var - Name of environment variable for jdbc-url. Default: DATABASE_URL
. (optional)
:migrations-dir - Path to directory containing migration files relative to the resources
dir. Default: db/migrations
. (optional)
:migrations-table - Custom name for the migrations table in the database. Default: automigrate_migrations
. (optional)
Show the list of existing migrations with status. Available options: :jdbc-url - JDBC url for the database connection. Default: get from `DATABASE_URL` env var. (optional) :jdbc-url-env-var - Name of environment variable for jdbc-url. Default: `DATABASE_URL`. (optional) :migrations-dir - Path to directory containing migration files relative to the `resources` dir. Default: `db/migrations`. (optional) :migrations-table - Custom name for the migrations table in the database. Default: `automigrate_migrations`. (optional)
(make args)
Create a new migration based on changes to the models.
Available options:
:name - Custom name for a migration. Default: auto-generated name by first action in migration. (optional)
:type - Type of new migration, empty by default for auto-generated migration.
Set :empty-sql
- for creating an empty raw SQL migration. (optional)
:models-file - Path to the file with model definitions relative to the resources
dir. Default: db/models.edn
. (optional)
:migrations-dir - Path to directory containing migration files relative to the resources
dir. Default: db/migrations
. (optional)
:resources-dir - Path to resources dir to create migrations dir, if it doesn't exist. Default: resources
(optional)
Create a new migration based on changes to the models. Available options: :name - Custom name for a migration. Default: auto-generated name by first action in migration. (optional) :type - Type of new migration, empty by default for auto-generated migration. Set `:empty-sql` - for creating an empty raw SQL migration. (optional) :models-file - Path to the file with model definitions relative to the `resources` dir. Default: `db/models.edn`. (optional) :migrations-dir - Path to directory containing migration files relative to the `resources` dir. Default: `db/migrations`. (optional) :resources-dir - Path to resources dir to create migrations dir, if it doesn't exist. Default: `resources` (optional)
(migrate)
(migrate {:keys [jdbc-url-env-var] :as args})
Run existing migrations and change the database schema.
Available options:
:number - Integer number of the target migration. (optional)
:jdbc-url - JDBC url for the database connection. Default: get from DATABASE_URL
env var. (optional)
:jdbc-url-env-var - Name of environment variable for jdbc-url. Default: DATABASE_URL
. (optional)
:migrations-dir - Path to directory containing migration files relative to the resources
dir. Default: db/migrations
. (optional)
:migrations-table - Custom name for the migrations table in the database. (optional)
Run existing migrations and change the database schema. Available options: :number - Integer number of the target migration. (optional) :jdbc-url - JDBC url for the database connection. Default: get from `DATABASE_URL` env var. (optional) :jdbc-url-env-var - Name of environment variable for jdbc-url. Default: `DATABASE_URL`. (optional) :migrations-dir - Path to directory containing migration files relative to the `resources` dir. Default: `db/migrations`. (optional) :migrations-table - Custom name for the migrations table in the database. (optional)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close