babenkoivan / elastic-migrations

Elasticsearch migrations for Laravel
MIT License
187 stars 32 forks source link

multiple migration directories support #36

Closed GiTsu closed 2 years ago

GiTsu commented 2 years ago

Hi. I develop my Laravel app using packages so they are located in different folders. Now it's impossible to load migrations from every package like standart laravel migrations can (only app-wise folder). MigrationStorage uses only one path from config. Is it possible somehow to add this path to an array by default and have some (facades?) method to call in package service provider for adding any custom folders to this array? Generates to one default folder, reads from multiple.

babenkoivan commented 2 years ago

Hey, it is somehow complicated due to the current package architecture. Maybe you can have some post-install-cmd composer script, which would copy migration files from all your directories to a single folder configured in elastic.migrations.storage_directory? This would be a much simpler solution.

GiTsu commented 2 years ago

Thanks, i'll try