[Enhancement] Allow finding operations from multiple directories
Hi,
I have an enhancement suggestion.
Allow loading operations from multiple directories just like laravel migrations.
This can be done via the config file directory key maybe renamed to directories with a fallback to directory to avoid breaking change.
Also you could add a method called loadOperationsFrom() the same way laravel provides loadMigrationsFrom()
Personally for my use case, i have two places where i can load laravel migrations from.
I have a similar request, so not opening a new issue.
My case is this. I have a multi-tenant application that uses two databases. So I would need to load operations from different directories - one for tenants, and one for the central app (landlord).
While this enhancement could work partially for me, I have trouble with migrating the operations table. This is just a thought for now. I will eventually need to create the table in both tenant and landlord database.
Since the operations table migration is not published, and always picks form the vendor directory, when I run migrate --database=tenant, its fine and creates the operations table in the tenant database. This works because for tenant database the migration files are stored in the default location - database/migrations. But when I want to run it for the default database migrate --database=landlord --path=database/migrations/landlord it wouldn't pick up the migration for operations as it is in the vendor directory. For now I just copied the migration to the landlord directory, but it would be nice if we could publish the migration file.
Never mind, I mitigated the issue by moving my tenant migrations to it's own directory.
But yeah, I can't wait for the enhancement to be merged 😀.