Every data team I have worked on has had a relational database at the core of our operations. When you have a relational database, you will inevitably have to change it! This post will help you decide between three useful frameworks for versioned database migrations - sqitch, flyway, and liquibase. This repository walks through each implementation of the same database in a dockerized PostgreSQL database.
I focused this guide on sqitch, flyway, and liquibase because they share two important characteristics. They all work with virtually any relational database - this cuts out Microsoft's excellent DACPACs. They all allow users to write migrations in plain SQL - this cuts out most ORM implementations like Alembic and Orator.
Turn on the database and run all migrations with a single command
docker-compose up
Run the flyway migrations
./src/bin/run-flyway-migrations.sh
Run the sqitch migrations
./src/bin/run-sqitch-migrations.sh
Run the liquibase migrations
./src/bin/run-liquibase-migrations.sh