Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Show HN: Schema_ferry – Continuous schema migration from MySQL to PostgreSQL

Schema_ferry is a tool for continuous schema migration from MySQL to PostgreSQL. Unlike existing single-shot migration tools like pgloader, it handles ongoing schema changes by parsing MySQL schemas via Rails ActiveRecord, applying customizable migration rules with a user-defined DSL, and using ridgepole to generate and apply only the necessary DDL to PostgreSQL.

Background

MySQL and PostgreSQL are two of the most popular open-source relational databases. Many projects start with MySQL but later migrate to PostgreSQL for features like better concurrency, advanced indexing, or JSON support. Existing migration tools (like pgloader) do a one-time transfer but don't track subsequent schema changes, leaving developers to write custom scripts to keep the two databases in sync during ongoing development. Schema_ferry is a Ruby-based tool that continuously monitors MySQL schema changes and automatically applies them to PostgreSQL. It uses Rails' ActiveRecord (a Ruby ORM framework) to parse MySQL schemas, lets users define custom migration rules via a DSL (domain-specific language), and applies changes through Ridgepole (a popular schema management tool in the Japanese Rails community). This makes it suitable for teams that need to maintain both databases simultaneously during a gradual migration.

Related stories