ddl-manager (v2.4.32-alpha) is a CLI tool for storing PostgreSQL functions and triggers in files and synchronizing them with a database. It supports building (migrating from files to DB), watching for file changes, and dumping (exporting DB objects to files). Unlike general migration tools, it focuses specifically on managing procedural objects and offers a configuration file for database connection and parsing options. Note: version includes '-alpha', indicating it is still in development.
npm install ddl-managerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Programmatic example of using build() to migrate SQL files to PostgreSQL.
Use import syntax or dynamic import() instead of require().
Set PGUSER environment variable instead of using --user.
Use dump with --unfreeze=true to get a snapshot before building.
Use import statement or enable ESM in your project (e.g., add 'type': 'module' in package.json).
Switch to import syntax or use dynamic import().
Change import to: import { build } from 'ddl-manager'Ensure PostgreSQL is running and check config (host, port, user, password).
Remove --user flag and set PGUSER environment variable.