Side by side
node-pg-migrate vs pt-online-schema-change
Both stand on database migration tools. Which one you can start free with, which one lets you read the code, and what each costs once you pay.
Free plan APISelf-hosted
node-pg-migrate provides a focused PostgreSQL migration workflow with several deployment safeguards. Its language options, dry runs, locking, and rollback support suit teams that meet the documented runtime and database requirements.
Visit node-pg-migrate Free plan LinuxSelf-hosted
pt-online-schema-change provides a chunked approach to MySQL table replacement with load and replica checks. Existing triggers, key requirements, and foreign-key handling can constrain its use, so table conditions matter before execution.
Visit pt-online-schema-changeThe facts
| node-pg-migrate | pt-online-schema-change | |
|---|---|---|
| Free plan | Yes | Yes |
| Open source | Not published | Not published |
| Runs on | API, Self-hosted | Linux, Self-hosted |
| Lowest paid plan | Not published | Free or on request |
| Plans published | None | 1 |
| Maker | Not published | Not published |
| Website | salsita.github.io | docs.percona.com |
| On database migration tools | #22 of 32 | #18 of 32 |
node-pg-migrate: what it does well
- Supports JavaScript, TypeScript, and SQL migrations
- Dry runs print SQL without applying changes
- Pending migrations use transactions and advisory locks
- Rollback migrations can be inferred for reversible operations
- Covers many PostgreSQL database objects
What to know first
- Targets PostgreSQL rather than multiple database systems
- Requires Node.js 22.12.0 or higher
- PostgreSQL versions below 14 are unsupported
- The pg library may need separate installation
pt-online-schema-change: what it does well
- Copies rows in small chunks.
- Can pause for high load or delayed replicas.
- Does not alter tables without --execute.
- Free and self-hosted on Linux.
What to know first
- Most tables need a primary or unique key.
- Tables with existing triggers are unsupported.
- Foreign-key handling introduces additional risk.
- Requires Perl, DBI, DBD::mysql, and MySQL 5.0.2 or newer.
Alternatives to node-pg-migrate Alternatives to pt-online-schema-change The whole list