WouterJEloquentBundle icon indicating copy to clipboard operation
WouterJEloquentBundle copied to clipboard

Change the migrations default path. wouterj_eloquent.migration_path

Open fabioars opened this issue 6 years ago • 4 comments

Hello,

I wan't do know, how do change the variable wouterj_eloquent.migration_path in my project. If possible, use many paths I want.

image

tks!

fabioars avatar Jan 11 '18 14:01 fabioars

You can simply override the parameter wouterj_eloquent.migration_path:

parameters:
    wouterj_eloquent.migration_path: 'my/path'

Although supporting multiple path won't be possible (and what's the use case?)

theofidry avatar Jan 11 '18 15:01 theofidry

I'm trying to implement Porto SAP with Symfony 4. Where all all MVC parts are separated by context.

fabioars avatar Jan 11 '18 17:01 fabioars

Maybe if you separate it by use cases and another aggregation you want?
Ex: '2017_01_11_151700_Users_SomeAggregator_CreateUsersTable.php' Correct if I'm wrong, but AFAIK migrations ever use to reside on a unique single path in various implementations.

duayres avatar Jan 11 '18 17:01 duayres

Hmm, in Laravel, you can call $migrator->path('my-custom-path'). However, you can't do that with my Bundle yet. I have to think of a nice way to configure all these classes in a Laravel-ish way (as #79 is about such feature as well).

wouterj avatar Jan 12 '18 16:01 wouterj