salsita / node-pg-migrate

Node.js database migration management for PostgreSQL
https://salsita.github.io/node-pg-migrate
MIT License
1.27k stars 174 forks source link

Migrations into subdirectories (readdir recursive directory search) #932

Open nepster-web opened 1 year ago

nepster-web commented 1 year ago

this function looks weak: https://github.com/salsita/node-pg-migrate/blob/master/src/migration.ts#L46

Is it planned to support nested directories in the migrations folder?

for example: изображение

ruiwei commented 1 year ago

It would be nice to support subfolders.

mythmon commented 2 months ago

Would you take a PR To add this feature? On my project we've been using node-pg-migrate for several years, and have nearly 500 migrations now. It's getting a bit annoying to scroll through all the migration files when editing code. I'd love to be able to put a migration file like 20240624172531774_add-new-table.sql (using utc prefix) into a subdirectory like 2024/20240624172531774_add-new-table.sql (or maybe 2024/0624172531774_add-new-table.sql)

Shinigami92 commented 2 months ago

@mythmon As I expect this does not introduce breaking changes, you can start with a PR 😸