All Projects → lastland → Scala Forklift

lastland / Scala Forklift

Licence: other
Type-safe data migration tool for Slick, Git and beyond.

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to Scala Forklift

Slick Migration Api
Schema manipulation dialects and DSL for Slick (mirrored from gitlab)
Stars: ✭ 116 (-35.56%)
Mutual labels:  database-migrations, slick
Sqift
Powerful Swift wrapper for SQLite
Stars: ✭ 119 (-33.89%)
Mutual labels:  database-migrations
Lol dba
lol_dba is a small package of rake tasks that scan your application models and displays a list of columns that probably should be indexed. Also, it can generate .sql migration scripts.
Stars: ✭ 1,363 (+657.22%)
Mutual labels:  database-migrations
Prana
Golang Database Management and Code Generation
Stars: ✭ 89 (-50.56%)
Mutual labels:  database-migrations
Flyway Sbt
Flyway SBT plugin
Stars: ✭ 101 (-43.89%)
Mutual labels:  database-migrations
Slick Repo
CRUD Repositories for Slick based persistence Scala projects.
Stars: ✭ 120 (-33.33%)
Mutual labels:  slick
Micrate
Database migration tool written in Crystal
Stars: ✭ 128 (-28.89%)
Mutual labels:  database-migrations
Kebs
Scala library to eliminate boilerplate
Stars: ✭ 113 (-37.22%)
Mutual labels:  slick
Migrations
CakePHP database migrations plugin
Stars: ✭ 114 (-36.67%)
Mutual labels:  database-migrations
Goose
A database migration tool. Supports SQL migrations and Go functions.
Stars: ✭ 2,112 (+1073.33%)
Mutual labels:  database-migrations
Slickr
slick carousel htmlwidget for R
Stars: ✭ 104 (-42.22%)
Mutual labels:  slick
Unicorn
Small Slick library for type-safe id handling
Stars: ✭ 107 (-40.56%)
Mutual labels:  slick
Flyway Docker
Official Flyway Docker images
Stars: ✭ 123 (-31.67%)
Mutual labels:  database-migrations
React Slick
React carousel component
Stars: ✭ 10,067 (+5492.78%)
Mutual labels:  slick
Yuniql
Free and open source schema versioning and database migration made natively with .NET Core.
Stars: ✭ 156 (-13.33%)
Mutual labels:  database-migrations
Jquery Slick Rails
Integrates Slick carousel, a jQuery plugin, into your Rails app.
Stars: ✭ 89 (-50.56%)
Mutual labels:  slick
Postgres Migrations
🐦 A Stack Overflow-inspired PostgreSQL migration library with strict ordering and immutable migrations
Stars: ✭ 161 (-10.56%)
Mutual labels:  database-migrations
Phinx Migrations Generator
A Migration Code Generator for Phinx
Stars: ✭ 178 (-1.11%)
Mutual labels:  database-migrations
Slickless
Support for shapeless HLists/Generics in Slick.
Stars: ✭ 161 (-10.56%)
Mutual labels:  slick
Dbmate
🚀 A lightweight, framework-agnostic database migration tool.
Stars: ✭ 2,228 (+1137.78%)
Mutual labels:  database-migrations

Scala-Forklift

Circle CI Join the chat at https://gitter.im/lastland/scala-forklift

Scala-Forklift helps manage and apply database migrations for your Scala project.

Write your migrations in plain SQL:

MyMigrations.migrations = MyMigrations.migrations :+ SqlMigration(1)(List(
  sqlu"""create table "users" ("id" INTEGER NOT NULL PRIMARY KEY,"first" VARCHAR NOT NULL,"last" VARCHAR NOT NULL)"""
))

Or type-safe Slick queries:

MyMigrations.migrations = MyMigrations.migrations :+ DBIOMigration(2)(
  DBIO.seq(Users ++= Seq(
    UsersRow(1, "Chris","Vogt"),
    UsersRow(2, "Yao","Li")
  )))

Or use slick-migration-api:

MyMigrations.migrations = MyMigrations.migrations :+ APIMigration(3)(
  TableMigration(Users).
    renameColumn(_.first, "firstname").
    renameColumn(_.last, "lastname"))

(Note: APIMigration is not supported in versions prior to v0.2.3)

Don't worry about keeping the Scala code and your database schema consistent. Our source code generator will have it generated for you.

Key Features:

  • Supports for type-safe database migration with Slick and slick-migration-api.
  • A source code generator to generate and manage Scala models from your database schemas.
  • A tool to help you manage your dev db with git, with supports for branching and merging.
  • High customizability.

How to Use

Scala-Forklift supports both Slick 3.1 and Slick 3.2. The latest versions of Scala-Forklift are given below:

Scala Version Slick Version SBT dependency
2.11.x 3.1.x libraryDependencies += "com.liyaos" %% "scala-forklift-slick" % "0.2.3"
2.12.x, 2.11.x 3.2.x libraryDependencies += "com.liyaos" %% "scala-forklift-slick" % "0.3.1"
2.13.x, 2.12.x 3.3.x libraryDependencies += "com.liyaos" %% "scala-forklift-slick" % "0.3.2"

For tutorial and example code, please check example.

Here is also a wonderful tutorial written by Andreas Burkard and Julian Tragé.

Quick Start

You can use our start template on GitHub to quickly start a project with Scala-Forklift:

git clone https://github.com/lastland/scala-forklift-start-template.git

More Examples

Known Issues

  • The reset command may not correctly handle database schemas with foreign keys.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].