Skip to content

Limetric/pgferry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pgferry

A MySQL/SQLite-to-PostgreSQL migration CLI. Single binary, zero runtime dependencies.

Reads your source schema, creates matching PostgreSQL tables, streams data in parallel via COPY, then wires up constraints, indexes, sequences, and (optionally) triggers.

Source Driver Workers Snapshot mode
MySQL go-sql-driver/mysql Parallel (configurable) none, single_tx
SQLite modernc.org/sqlite (pure Go) Sequential (1 worker) none only

Install

Download the latest binary from the GitHub Releases page, or:

go install github.com/Limetric/pgferry@latest

Quick start

MySQL → PostgreSQL

schema = "app"

[source]
type = "mysql"
dsn = "root:root@tcp(127.0.0.1:3306)/source_db"

[target]
dsn = "postgres://postgres:postgres@127.0.0.1:5432/target_db?sslmode=disable"

SQLite → PostgreSQL

schema = "app"

[source]
type = "sqlite"
dsn = "/path/to/database.db"

[target]
dsn = "postgres://postgres:postgres@127.0.0.1:5432/target_db?sslmode=disable"

Run:

pgferry migration.toml

pgferry will introspect the source, create tables under the app schema, stream all data, then add primary keys, indexes, foreign keys, and auto-increment sequences.

Why not pgloader?

pgloader is a great tool. pgferry aims to be simpler and more robust out of the box — native MySQL 8.4+ auth, a single TOML config instead of a custom DSL, flexible type mapping coercions, charset/collation awareness, SQL hooks, configurable orphan cleanup, and SQLite support.

We also maintain a pgloader fork that patches common upstream issues.

Examples

The examples/ directory has ready-to-use configs: minimal-safe, recreate-fast, hooks, sakila, schema-only, data-only.

Documentation

License

Apache 2.0 — see LICENSE.

About

MySQL/SQLite-to-PostgreSQL migration CLI. Single binary, zero runtime dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages