vendure
vendure copied to clipboard
`npx vendure migrate` doesn't detect migrations placed in the root of the project
Describe the bug
CLI tool gives two options for where to place the newly created migration files. When placed in the root of the project migrations are ignored. However, when placed in the src
everything works as intended.
To Reproduce Steps to reproduce the behavior:
- Choose root when prompted in the cli
- Try running migrations
-
No pending migrations found!
Expected behavior
Migration files should be detected in both the root and the src
.
Environment (please complete the following information):
- @vendure/core version: 2.2.3
- Nodejs version: 20.12.0
- Database (mysql/postgres etc): postgresql
you need to add an additional path to the dbConnectionOptions
to also read the migrations folders in the root
migrations: [path.join(__dirname, './migrations/*.+(js|ts)'),path.join(__dirname, '../migrations/*.+(js|ts)')],