mongo-to-postgres

Installation
SKILL.md

Migrate MongoDB → Postgres

The migration is more conceptual than mechanical. MongoDB's "no schema" becomes Postgres's "explicit schema (with JSONB for fluid bits)." Done well, you gain transactions, joins, and 30-year-old query optimization. Done poorly, you reinvent Mongo in Postgres and miss the wins.

When to use

  • Mongo cluster has become a cost / maintenance liability.
  • Query patterns are heavily relational (lots of $lookup, multi-collection joins).
  • Data integrity issues from missing schema constraints.
  • Need ACID transactions across collections (yes, Mongo has multi-doc transactions, but Postgres's are first-class).

When NOT to use

  • True document-shaped data (logs, events, analytics) — Mongo is fine; or move to a column store.
  • Hyper-write-heavy workloads where you've tuned Mongo's sharding well.
  • The team has no Postgres experience and hires can't fill it — operational risk dominates.

The mental shift

Installs
2
GitHub Stars
1
First Seen
Sep 28, 2026