Company
Date Published
Author
Jimmy Guerrero
Word count
1233
Language
English
Hacker News points
None

Summary

Flyway is an open source database version control and migration tool that supports multiple databases including Oracle, SQL Server, DB2, MySQL, PostgreSQL, and YugabyteDB, which is compatible with PostgreSQL wire protocol. Flyway provides seven commands for managing database version control: Migrate, Clean, Info, Validate, Undo, Baseline, and Repair. The tool can be used to deploy and roll back schema changes to a distributed SQL database like YugabyteDB using the PostgreSQL JDBC driver. A 3 node YugabyteDB cluster was installed on Google Kubernetes Platform (GKE) for this demo, with Flyway installed locally and connected to the YSQL service of the cluster. The tool was used to run database migrations against the YugabyteDB database, including creating a schema history table and inserting data into the motorcycle_manufacturers table. Additionally, the `clean` command was used to drop all objects in the configured schemas.