Liking cljdoc? Tell your friends :D

automigrate.core

Public interface for lib's users.

Public interface for lib's users.
raw docstring

-mainclj

(-main command & args)
source

cli-options-commonclj

source

cli-options-explainclj

source

cli-options-helpclj

source

cli-options-makeclj

source

cli-options-migrateclj

source

explainclj

(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)
sourceraw docstring

helpclj

(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)
sourceraw docstring

listclj

(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)
sourceraw docstring

makeclj

(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)
sourceraw docstring

migrateclj

(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)
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close