node-pg-migrate
node-pg-migrate copied to clipboard
checkOrder is on by default in CLI but not in lib
Describe the bug
Based on the CLI documentation I assumed the default for checkOrder would be true when running node-pg-migrate as a library. However that documentation is only about the CLI and in the case of the Programmatic API, the default is undefined which makes checkOrder false. To be fair, the Programmatic API documentation doesn't make any claims about default values so this can be considered a user error as well.
Steps to reproduce
- Create a migration
- Run the migration
- Create a new migration with an older timestamp
- Run it with the CLI and see it fail
- Run it with the Programmatic API and see it getting applied out of order
Logs
No response
System Info
Node: 20.17.0
node-pg-migrate: 6.2.2 (but seems to be the same in 7.x)
Used Module System
esm