Sneha Tilak My SGA diaries...

Assignment 4

Problem Statement:

Database versioning is the management and tracking of changes made to a database. All changes to scripts that define tables, procedures, triggers, views, indexes, sequences and other user defined objects are stored and versioned.

Constraints:


Possible Solutions:

Method Source
Liquibase liquibase.org
Flyway flywaydb.org

Solution Evaluation:

Liquibase

It is an open-source library which acts as a source control for your database! It’s a change management tool built on Java. So, instead of modifying the database by executing SQL statements on it, we can define the changes to be made in XML/YAML/JSON/SQL format files. The file is called changelog. We can execute Liquibase as a part of our Maven or Ant build. It will then apply the changeset to the database. In case of any conflicts, it can also handle rollback of the database state.

Flyway

It is an open-source database migration tool. It strongly favors simplicity and convention over configuration. It is based around just 6 basic commands: Migrate, Clean, Info, Validate, Baseline and Repair. Migrations can be written in SQL (database-specific syntax such as PL/SQL, T-SQL,etc is supported) or Java (for advanced data transformations or dealing with LOBs). It has plugins for Maven, Gradle and Ant.

Liquibase vs Flyway

Features supported by Liquibase:

Features supported by Flyway:


Other References: