Liking cljdoc? Tell your friends :D

datofu.migration


already-runclj

(already-run db)
source

install-and-migrate!clj

(install-and-migrate! conn schema-tx migrs)

Basic high-level utility for installing a Datomic schema and install migrations in an indempotent way.

  • conn should be a Datomic connection
  • schema-tx should be a Datomic schema installation transaction (will be run before the migrations, should be idempotent.)
  • migrs is a seq of maps, representing migrations to be run in order.

Each map of migrs should have the following properties:

  • :datofu.migration/id (required): a keyword, the id of the migration.
  • :datofu.migration/tx (required): a Datomic transaction request, to be run exactly once.
  • :datofu.migration/schema-tx (optional): a Datomic transaction request, installing a schema specific to this transaction. (will be run before the migrations, should be idempotent.)

The migrations are run one after the other (since a migration may rely on the state of the database after a previous migration).

The goal of this function is to easily sync a Datomic system to a given codebase.

Basic high-level utility for installing a Datomic schema and install migrations in an indempotent way.
* `conn` should be a Datomic connection
* `schema-tx` should be a Datomic schema installation transaction (will be run before the migrations, should be idempotent.)
* `migrs` is a seq of maps, representing migrations to be run in order.

Each map of `migrs` should have the following properties:
* :datofu.migration/id (required):  a keyword, the id of the migration.
* :datofu.migration/tx (required): a Datomic transaction request, to be run exactly once.
* :datofu.migration/schema-tx (optional): a Datomic transaction request, installing a schema specific to this transaction.
(will be run before the migrations, should be idempotent.)

The migrations are run one after the other (since a migration may rely on the state
of the database after a previous migration).

The goal of this function is to easily sync a Datomic system to a given codebase.
sourceraw docstring

schema-txclj

(schema-tx)
source

to-run-diagnosisclj

(to-run-diagnosis db migrs)
source

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

× close