HUB
Sign inSign up
flyway logo

shouldbee/flyway

By shouldbee

•Updated about 11 years ago

Image
4

100K+

shouldbee/flyway repository overview

⁠docker-flyway

Flyway is database migration tool. This is a docker image that eases setup.

⁠About Flyway

Flyway is an open-source database migration tool. It strongly favors simplicity and convention over configuration.

From: Documentation - Flyway • Database Migrations Made Easy.⁠

⁠Install

This docker image is available as an automated build on the docker registry hub⁠, so using it is as simple as running:

$ docker run shouldbee/flyway

To further ease running, it's recommended to set up a much shorter function so that you can easily execute it as just flyway:

$ flyway () {
  sudo docker run -it --rm --net host -v `pwd`:/flyway/sql shouldbee/flyway $@
}

This will create a temporary function. In order to make it persist reboots, you can append this exact line to your ~/.bashrc (or similar) like this:

$ declare -f flyway >> ~/.bashrc

⁠Usage

Go to the directory which has migration SQL files.

$ cd src/main/resources/db/migration

Then run flyway command.

$ flyway -url=jdbc:mysql://127.0.0.1/mydb -user=root -password=mypass migrate
Tag summary
Recent tags
Content type
Image
Digest
sha256:80bb3ad7c…
Size
264 MB
Last updated
about 11 years ago
docker pull shouldbee/flyway:latest