Simple data migration tool to transfer collections from MongoDB to PostgreSQL tables using Mongoose and Knex. Current stable version is 0.0.6. Low release cadence (last update unknown). Key differentiators: handles field renaming, field redefinition, foreign keys, and many-to-many link tables in a single configuration object. Lightweight alternative to ETL tools for one-off migrations.
npm install mongo-to-postgresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows full migration configuration with connections, field renames, redefines, foreign keys, and many-to-many link tables.
Order collections array by dependency: parent tables first, child tables later.
Create PostgreSQL tables and schema before running migration.
Set type: module in package.json or use dynamic import().
Consider alternative tools like pgloader or custom scripts.
Provide collectionName for every collection in the collections array.
Run npm install mongo-to-postgres and ensure type: module in package.json for ESM.
Create all target tables in PostgreSQL before running the migration.