Skip to content
This repository has been archived by the owner on Oct 30, 2021. It is now read-only.

fcomb/db-migration

Repository files navigation

Lightweight DB Migration

Build Status License

Extremely fast lightweight plain sql migration tool without pain. Tested on PostgreSQL 11.0.

Features

  • Plain sql migrations support
  • Extremely fast
  • Locks

TODO

  • Tests
  • sbt plugin
  • Rollbacks
  • Diff
  • Truncate

Add to project

Add resolvers to your build.sbt

resolvers += Resolver.bintrayRepo("fcomb", "maven")

Add dependencies to your build.sbt

libraryDependencies += "io.fcomb" %% "db-migration" % "0.6.3"

Usage

Add migrations as a plain sql files into src/main/resources/sql/migrations with name format V{\d+}__{\w+}.sql (V1427135578__CreateUsers.sql for example).

Then apply your migrations:

import io.fcomb.db.Migration

Migration.run("jdbc:postgresql://127.0.0.1:5432/fcomb", "postgres", "")

Releases

No releases published

Packages

No packages published

Languages