omigrate

Database migrations for Reason and OCaml
README

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.

Install
Published
15 Nov 2022
Maintainers
Sources
omigrate-0.3.2.tbz
sha256=7df11359cb7175891a6776d552ef12641d54f330ab187e913f15166970ef46bf
sha512=83599cf881ffc26027dad200dad1156cc8d220b6f45ad23b758f4eaea6e21359ec2517d753f5facabf682b10f284341bdbdec121563b7096a94a110ce1933b47
Dependencies
odoc
with-doc
sqlite3
>= "5.0.1"
cmdliner
>= "1.1.0"
fmt
>= "0.9.0"
lwt
>= "5.3.0"
result
>= "1.5"
ocaml
>= "4.08.0"
dune
>= "3.0"
Reverse Dependencies