Type-safe data migration tool for Slick, Git and beyond.
APIMigration
, where you can use the syntax from slick-migration-api. You can find an example in example/migrations/src_migrations/main/scala/3.scala
:import slick.migration.api.TableMigration
import slick.migration.api.H2Dialect
import com.liyaos.forklift.slick.APIMigration
import datamodel.v2.schema.tables._
object M3 {
implicit val dialect = new H2Dialect
MyMigrations.migrations = MyMigrations.migrations :+ APIMigration( 3 )(
TableMigration(Users).
renameColumn(_.first, "firstname").
renameColumn(_.last, "lastname"))
}
To learn more about slick-migration-api, please check https://github.com/nafg/slick-migration-api
mg new
command (#22 by @kshepard).mg new
command (https://github.com/lastland/scala-forklift/commit/ce327c3a5764df335b2c60caa4982419b3e3b56e).If you are using Scala-Forklift with Slick 3.2.0, this is the version you need. For Slick 3.1.1, please use Scala-Forklift 0.2.2.
This is basically the same version as v0.2.2
, except for a few changes made to support Slick 3.2.0-M1. The changes include:
genCode
method to work with the changed behavior of Slick profile's toString
method.build.sbt
instead of project\build.scala
in the example project (#20 by @DerLump).MigrationSummary
file is now properly ordered (#21 by @kshepard).