package sihl

  1. Overview
  2. Docs

Module Migration.MakeSource

Parameters

module Repo : sig ... end

Signature

Sourceval register_migration : (string * Sihl__.Contract_migration.step list) -> unit

register_migration migration registers a migration migration with the migration service so it can be executed with `run_all`.

Sourceval register_migrations : (string * Sihl__.Contract_migration.step list) list -> unit

register_migrations migrations registers migrations migrations with the migration service so it can be executed with `run_all`.

Sourceval execute : (string * Sihl__.Contract_migration.step list) list -> unit Lwt.t

execute migrations runs all migrations migrations.

Sourceval run_all : unit -> unit Lwt.t

run_all () runs all migrations that have been registered.

Sourceval pending_migrations : unit -> (string * int) list Lwt.t

pending_migrations () returns a list of migrations that need to be executed in order to have all migrations applied. The returned migration is a tuple (namespace, number) where namespace is the namespace of the migration and number is the number of pending migrations that need to be applied in order to achieve the desired schema version.

An empty list means that there are no pending migrations and that the database schema is up-to-date.

Sourceval register : ?migrations:(string * Sihl__.Contract_migration.step list) list -> unit -> Sihl__.Core_container.Service.t
Sourceval lifecycle : Sihl__.Core_container.lifecycle
OCaml

Innovation. Community. Security.