node-pg-migrate icon indicating copy to clipboard operation
node-pg-migrate copied to clipboard

checkOrder is on by default in CLI but not in lib

Open nlochschmidt opened this issue 1 year ago • 0 comments

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

  1. Create a migration
  2. Run the migration
  3. Create a new migration with an older timestamp
  4. Run it with the CLI and see it fail
  5. 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

nlochschmidt avatar Sep 12 '24 13:09 nlochschmidt