Sign inSign up

reo7sp/two-step-migrate

By reo7sp

•Updated about 8 years ago

SQL migration tool for blue-green deployments

Image
0

357

reo7sp/two-step-migrate repository overview

⁠two-step-migrate

SQL migration tool.

screenshot

This is tool is adapted for seamless deployments of backend code. Each migration has two steps: half and total.

Half migration is backward-compatible database migration, which allows to work previous and next version of your backend code simultaneously. In this migration you cannot remove or rename columns because in that case the old backend code will break.

Total migration is backward-not-compatible database migration.


⁠Installation

⁠Using precompiled binaries

The compiled binaries exist under the releases tab: https://github.com/reo7sp/two-step-migrate/releases⁠

⁠Using docker

Use reo7sp/two-step-migrate⁠ docker image.

⁠Using go
go get github.com/reo7sp/two-step-migrate

⁠Usage

two-step-migrate [command]

Available commands:

  • new — Create a new migration
  • up — Apply migration
  • down — Rollback migration

Required environment variables:

  • DATABASE_URL — DSN to the sql database.

⁠Caveats

Currently supports only PostgreSQL.

Tag summary

Content type

Image

Digest

Size

7.7 MB

Last updated

about 8 years ago

docker pull reo7sp/two-step-migrate