8000 GitHub - mdarse/migrant: Database migrations for SQLite
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ migrant Public
forked from aosasona/migrant

Database migrations for SQLite

License

Notifications You must be signed in to change notification settings

mdarse/migrant

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Migrant

Database migrations for SQLite in Gleam

Usage

import gleam/erlang
import app/database
import migrant

pub fn main() {
  let db = database.connect()

  let assert Ok(priv_directory) = erlang.priv_directory("app")
  let assert Ok(_) = migrant.migrate(db, priv_directory <> "/migrations")

  Nil
}

Installation

This library is currently being developed as it is used in projects & as needed, there are no stable (or really any) releases yet and there won't be for a while. If you want to use it regardless, you can install it as a local dependency by cloning this repo and adding this to your gleam.toml file

UPDATE: there is an alpha release now (for convenience), use at your own risk

[dependencies]
migrant = { path = "path/to/migrant" }

Installing Alpha from Hex

Again, this has not been thoroughly tested, it has been built to suit what I need at the moment, use at your own risk.

gleam add migrant

Targets

In theory, this should work in both Javascript and Erlang targets since all the dependencies have support for both targets, but it is only currently being developed and tested against the Erlang/BEAM runtime.

About

Database migrations for SQLite

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Gleam 100.0%
0