jjeffery / migration

Database schema migration for Go

Home Page:https://godoc.org/github.com/jjeffery/migration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

migration: Database Migrations

GoDoc License Build Status (Linux) Coverage Status GoReportCard

Package migration manages database schema migrations.

See the Godoc for usage details.

Features

  • Write database migrations in SQL or Go
  • Supports SQLite, Postgres and MySQL databases (support for MSSQL planned)
  • Migrations are performed in a transaction where possible
  • Up/Down migrations for applying and rolling back migrations
  • Replay previous migrations for restoring views, functions and stored procedures
  • Support for writing migrations on separate branches
  • Migrations are embedded in the executable
  • CLI package for easy integration with programs using cobra

Installation

go get -u github.com/jjeffery/migration

Example Usage

See the Godoc package example.

About

Database schema migration for Go

https://godoc.org/github.com/jjeffery/migration

License:MIT License


Languages

Language:Go 100.0%