0Pricing
SQL Academy · Lesson

Tools: Flyway, Liquibase, Sqitch

Compare popular schema migration tools, their versioning models, and CI integration.

Why Migration Tools?

Schema changes need to be:

  • Versioned in source control
  • Applied in a deterministic order
  • Run automatically in CI/CD
  • Rollback-able (sometimes)

Flyway

Java-based, file-based migrations. Each file is named with a version prefix:

-- V1__create_users.sql
CREATE TABLE users (id BIGSERIAL PRIMARY KEY, email TEXT NOT NULL);

-- V2__add_full_name.sql
ALTER TABLE users ADD COLUMN full_name TEXT;

-- Flyway tracks applied migrations in a flyway_schema_history table.

All lessons in this course

  1. Online Migrations: Why ALTER TABLE Locks
  2. Concurrent Indexes (CREATE INDEX CONCURRENTLY)
  3. Zero-Downtime Column Renames
  4. Tools: Flyway, Liquibase, Sqitch
← Back to SQL Academy