Skip to content
/ turtle Public

A Go tool that makes SQL migrations as great as turtle migrations

License

Notifications You must be signed in to change notification settings

nicday/turtle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turtle

Build Status Coverage Status

Sea turtles have migrating vast oceans for centuries and now you can be be power and grace of a turtle migration for your mySQL database.

Installation

go get github.com/nicday/turtle

Configuration

Turtle relies on your database connection details being present in your environment variables in order to preform the migrations. Turtle will try to autoload .env from the working directory, merging any variables found into the environment.

Please see .env.default for an example .env file.

Commands

The generate command generates a new set of migration files with your chosen migration name. Once the files have been generated you will need to populate them with your migration SQL.

turtle generate [name]

The up command applies all inactive migrations. Migrations that have already been applied are ignored.

turtle up

The down command reverts all active migrations. Migrations that are haven't been applied are ignroned.

turtle down

TODO

  • Ability to revert to migration x
  • Add PostgreSQL support
  • Provide information output on performed migrations
  • Example of using turtle migrations within Go
  • Create and update schema file after each performed migration

Author

Nic Day

License

Turtle is MIT-Licensed

About

A Go tool that makes SQL migrations as great as turtle migrations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages