Liking cljdoc? Tell your friends :D

ragtime.core

Functions for applying and rolling back migrations.

Functions for applying and rolling back migrations.
raw docstring

applied-migrationsclj

(applied-migrations store index)

List all migrations in the index that are applied to the database.

List all migrations in the index that are applied to the database.
sourceraw docstring

into-indexclj

(into-index migrations)
(into-index index migrations)

Add migrations to a map, using their :id as the key.

Add migrations to a map, using their :id as the key.
sourceraw docstring

migrateclj

(migrate store migration)

Apply a single migration to a data store.

Apply a single migration to a data store.
sourceraw docstring

migrate-allclj

(migrate-all store index migrations)
(migrate-all store index migrations options)

Migrate a data store with the supplied index and migration sequence. The index matches IDs in the data store with their associated migrations. The migrations should be a sequential collection in the order in which they should be applied to the database.

An additional map of options may be supplied that contains the following keys:

:strategy - defines what to do if there are conflicts between the migrations applied to the data store, and the migrations that need to be applied. The default strategy is ragtime.strategy/raise-error.

:reporter - a function that takes three arguments: the store, the operation (:up or :down) and the migration ID. The reporter is a side-effectful callback that can be used to print or report on the migrations as they are applied. The default reporter is ragtime.reporter/silent.

Migrate a data store with the supplied index and migration sequence. The
index matches IDs in the data store with their associated migrations. The
migrations should be a sequential collection in the order in which they
should be applied to the database.

An additional map of options may be supplied that contains the following
keys:

:strategy - defines what to do if there are conflicts between the migrations
            applied to the data store, and the migrations that need to be
            applied. The default strategy is ragtime.strategy/raise-error.

:reporter - a function that takes three arguments: the store, the operation
            (:up or :down) and the migration ID. The reporter is a
            side-effectful callback that can be used to print or report on
            the migrations as they are applied. The default reporter is
            ragtime.reporter/silent.
sourceraw docstring

rollbackclj

(rollback store migration)

Rollback a migration already applied to the database.

Rollback a migration already applied to the database.
sourceraw docstring

rollback-lastclj

(rollback-last store index)
(rollback-last store index n)
(rollback-last store index n options)

Rollback the last n migrations from the database, using the supplied migration index. If n is not specified, only the very last migration is rolled back.

Takes an option map that may include the :reporter key. See migrate-all.

Rollback the last n migrations from the database, using the supplied
migration index. If n is not specified, only the very last migration is
rolled back.

Takes an option map that may include the :reporter key. See migrate-all.
sourceraw docstring

rollback-toclj

(rollback-to store index migration-id)
(rollback-to store index migration-id options)

Rollback to a specific migration ID, using the supplied migration index.

Takes an option map that may include the :reporter key. See migrate-all.

Rollback to a specific migration ID, using the supplied migration index.

Takes an option map that may include the :reporter key. See migrate-all.
sourceraw docstring

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

× close