Liking cljdoc? Tell your friends :D

duct.component.ragtime

A component for handling migrations on a SQL database.

A component for handling migrations on a SQL database.
raw docstring

default-optionsclj

source

migrateclj

(migrate {:keys [datastore migrations strategy reporter]})

Migrates the dependent database to the latest migration.

Migrates the dependent database to the latest migration.
sourceraw docstring

Ragtimeclj

source

ragtimeclj

(ragtime options)

Create a Ragtime component for handling migrations. Expects a dependency :db that has a key :spec containing a clojure.java.jdbc compatible db-spec map.

Takes the following options:

:resource-path - the resource path to find migration files :strategy - the Ragtime strategy (defaults to ragtime.strategy/raise-error) :reporter - the reporter function (defaults to ragtime.repl/default-reporter)

Create a Ragtime component for handling migrations. Expects a dependency :db
that has a key :spec containing a clojure.java.jdbc compatible db-spec map.

Takes the following options:

  :resource-path - the resource path to find migration files
  :strategy      - the Ragtime strategy
                   (defaults to ragtime.strategy/raise-error)
  :reporter      - the reporter function
                   (defaults to ragtime.repl/default-reporter)
sourceraw docstring

reloadclj

(reload {:keys [resource-path] :as component})

Reload the migrations of a Ragtime component and return a new component.

Reload the migrations of a Ragtime component and return a new component.
sourceraw docstring

rollbackclj

(rollback component)
(rollback {:keys [datastore migrations reporter]} amount-or-id)

Rolls the dependent database back to a specific migration ID, or by a fixed number of migrations. If supplied with only one argument, the database is rolled back by only one migration.

Rolls the dependent database back to a specific migration ID, or by a fixed
number of migrations. If supplied with only one argument, the database is
rolled back by only one migration.
sourceraw docstring

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

× close