Convenience functions for running in the REPL.
Convenience functions for running in the REPL.
(migrate {:keys [datastore migrations strategy reporter]
:or {reporter reporter/print strategy strategy/raise-error}})Migrate the datastore up to the latest migration. Expects a configuration map with the following keys:
:datastore - a DataStore instance :migrations - an ordered collection of Migrations :strategy - the conflict strategy to use (defaults to ragtime.strategy/raise-error) :reporter - called when a migration is being applied (defaults to default-reporter)
Migrate the datastore up to the latest migration. Expects a configuration map
with the following keys:
:datastore - a DataStore instance
:migrations - an ordered collection of Migrations
:strategy - the conflict strategy to use
(defaults to ragtime.strategy/raise-error)
:reporter - called when a migration is being applied
(defaults to default-reporter)An atom holding a map that matches migration IDs to known migrations. This atom is updated automatically when the migrate or rollback functions are called.
An atom holding a map that matches migration IDs to known migrations. This atom is updated automatically when the migrate or rollback functions are called.
(rollback config)(rollback {:keys [datastore migrations reporter] :or {reporter reporter/print}}
amount-or-id)Rollback the datastore one or more migrations. Expects a configuration map and an optional number of migrations to roll back OR a migration ID to rollback to. The configuration expects the following keys:
:datastore - a DataStore instance :migrations - an ordered collection of Migrations :reporter - called when a migration is being applied (defaults to default-reporter)
Rollback the datastore one or more migrations. Expects a configuration map
and an optional number of migrations to roll back OR a migration ID to
rollback to. The configuration expects the following keys:
:datastore - a DataStore instance
:migrations - an ordered collection of Migrations
:reporter - called when a migration is being applied
(defaults to default-reporter) cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |