gungnir.migration
->migration
(->migration migration)
add-column*
(add-column* & col-elems)
columns
drop-column*
(drop-column* & col-elems)
format-action
multimethod
load-resources
(load-resources path)
Load any migrations EDN files in the path
resource directory. A migration file ends with the .edn
extension and contains a map with an :up
and :down
key.
migrate!
(migrate! migrations)
(migrate! migrations opts)
(migrate! migrations opts datasource)
Run any migrations
that haven’t been executed yet. An optional datasource
can be provided, defaults to gungnir.database/*datasource*
.
opts
takes the following arguments:
: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.
process-table-column
multimethod
process-table-column-child
multimethod
rollback!
(rollback! migrations)
(rollback! migrations datasource)
Rollback the last run migration from migrations
. An optional datasource
can be provided, defaults to gungnir.database/*datasource*
.
special-format
(special-format expr)
(special-format expr opts)