A framework for converting PostgreSQL databases to MongoDB. Current version 2.1.0, with ongoing maintenance. It provides a schema-mapping approach to translate relational structures (tables, relationships, constraints) into MongoDB collections and documents. Key differentiators: supports complex type conversions, custom mapping rules, and preserves data integrity. Release cadence is irregular, with version 2.x having breaking changes from 1.x. Primarily used for one-time migrations or ETL pipelines.
npm install postgres-to-mongoNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to PostgreSQL and MongoDB, converts specified tables to collections using mapping configuration.
Update imports to use ESM syntax and wrap calls in async functions.
Replace pg-promise usage with 'pg' Client and pass config as second argument.
Manually handle nested arrays by providing a custom type transformer in the mapping config.
Use 'import { convert } from "postgres-to-mongo";' and ensure project is configured for ESM.Provide a config object with at least 'tableMapping' property.
Check the table name in the config matches actual table names in PostgreSQL.
No dependency data recorded yet.