halvardssm / deno-nessie

A modular Deno library for PostgreSQL, MySQL, MariaDB and SQLite migrations
MIT License
527 stars 31 forks source link

[IDEA] Enable support for multiple migration and seed sources #96

Closed halvardssm closed 3 years ago

halvardssm commented 3 years ago

Is your feature request related to a problem? Please describe. When using other modules, sub projects or the likes, there could be multiple sources of migrations and seed files. This is more of an edge case, and will most likely not impact the average user of this library, but it is a good feature to have. This should allow for multiple directories in the config file and optionally also by using regex. In the future (v2), only array will be supported.

Describe the solution you'd like Add new option to the ClientOptions, namely plural of the current ones. For each array element, check if it is a folder, if not, check for files by using regex. The migration order still depends on the timestamp, so the migration will combine all the migrations and run them from oldest to newest.