ragtime.core

Functions for applying and rolling back migrations.

applied-migrations

(applied-migrations store index)
List all migrations in the index that are applied to the database.

into-index

(into-index migrations)(into-index index migrations)
Add migrations to a map, using their :id as the key.

migrate

(migrate store migration)
Apply a single migration to a data store.

migrate-all

(migrate-all store index migrations)(migrate-all store index migrations strategy)
Migrate a data store with the supplied index, migrations and
strategy. The index matches IDs in the data store with their
associated migrations. The 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.

rollback

(rollback store migration)
Rollback a migration already applied to the database.

rollback-last

(rollback-last store index)(rollback-last store index n)
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.

rollback-to

(rollback-to store index migration-id)
Rollback to a specific migration ID, using the supplied migration index.