Back to browse
GitHub Repository

Continuously sync MySQL schema definitions to PostgreSQL via a declarative DSL.

1 starsRuby

Schema_ferry – Continuous schema migration from MySQL to PostgreSQL

by kyuuri1791·Jul 8, 2026·1 point·0 comments

AI Analysis

●●SolidSolve My ProblemNiche Gem

Continuous schema sync beats pgloader's one-shot approach for long migrations.

Strengths
  • Declarative DSL allows fine-grained control over type mappings and index exclusions.
  • Dry-run mode shows exact changes before applying, preventing accidental data loss.
  • Designed for repeated CI/CD execution to handle schema drift during long data migrations.
Weaknesses
  • Requires Ruby and ActiveRecord, adding dependency overhead for non-Ruby teams.
  • Handles schema only; users must still manage data migration with separate tools like pgloader.
Target Audience

Backend engineers migrating from MySQL to PostgreSQL

Similar To

pgloader · AWS DMS · Debezium

Post Description

There exists several schema migration tools from MySQL to PostgreSQL, pgloader as one of the most popular ones.

All off them, as far as I have seen, is designed to be a single shot schema migration tool, so if MySQL schema was changed due to continuous development after pgloader was executed, developers have to sync them to PostgresQL in some kind of manual, or custom-made script. (custom-made script seems like the most common way when I searched it online) Another aspect of the existing ones is that how the schema is migrated tends to be a black box, and the configuration file didn't seem fully customizable to me. For example, you cannot do something like excluding an index for a certain table.

This tool can resolve both cases.

How it works consists of 3 steps:

1. parse MySQL schema into ruby-handleable objects by using rails ActiveRecord

2. combine 1., pre-defined general migration rules, and user-defined dsl to generate a PostgresQL schemafile

3. apply 2. using ridgepole(a common rails schema management tool in japan) to PostgresQL, which checks the diff between 2. and the actual PostgresQL schema and generates/runs the exact DDL necessary to apply

Similar Projects