package omigrate

  1. Overview
  2. Docs
Database migrations for Reason and OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

omigrate-0.3.1.tbz
sha256=53dc2e0c0b0426c7ae795b0ad1f2ce8055c723aa0a4957939958df028c11075c
sha512=aab0ea16aa41d85461987645a2ddb3607391063aa2b4ca9f4da73563062a9acffc9fd43f013b1a520b6dff3c76a09ac48a5e922b297328099580caab05ac69aa

Description

Database migrations for Reason and OCaml

Published: 26 Oct 2022

README

OCaml Migrate

Database migrations for Reason and OCaml

Drivers

  • PosgreSQL (omigrate.postgres)

  • Sqlite3 (omigrate.sqlite3)

Installation

Using Opam

opam install omigrate

Using Esy

esy add @opam/omigrate

Usage

omigrate create --dir DIR NAME

Create a new migration and prepend it with a timestamp.

omigrate ls --source SOURCE --database DATABASE

List the migrations with their state.

omigrate up --source SOURCE --database DATABASE

Apply all up migrations.

omigrate down --source SOURCE --database DATABASE

Apply all down migrations.

omigrate setup --source SOURCE --database DATABASE

Setup the database and run all the migrations.

omigrate drop --database DATABASE

Delete the database.

Examples

The example provides some migrations available to test omigrate with the different drivers.

Contributing

Take a look at our Contributing Guide.

Dependencies (11)

  1. sqlite3 >= "5.0.1"
  2. pgx_lwt_unix
  3. pgx
  4. fmt >= "0.9.0"
  5. logs
  6. cmdliner >= "1.1.0"
  7. uri
  8. lwt >= "5.3.0"
  9. result >= "1.5"
  10. ocaml >= "4.08.0"
  11. dune >= "3.0"

Dev Dependencies (1)

  1. odoc with-doc

Used by

None

Conflicts

None