-
-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ask for a namespace of when more one path #1414
Ask for a namespace of when more one path #1414
Conversation
Thank you. Please always write tests that cover your change. |
Thanks for the comment. I have added tests. |
@derrabus, what is missing for this PR to be approved? |
A green CI and a code review. I currently don't have time to conduct one, but maybe someone else does. |
@derrabus, hi! Is there any time for code review? The CI errors are not related to my code. The error is in the file Db Migrator.php which I have not touched. I don't believe it is necessary for me to fix it, but I can if needed. |
@Myks92 I addressed that issue for you 🙂 |
Thank you for your help! I hope the PR will now be approved. |
Sorry to disappoint 😬 … but you're on the right track 👍 |
Thanks for the reviews! I fixed it) |
Please kindly squash your commits together. If you don't, we'll try to remember to do it for you but it's best if you save us this trouble. How to do that?
|
@greg0ire It's done!) I know how to do it. Thanks for the detailed instructions!) |
It's a saved reply, so it's wasn't much effort 😁 |
Thanks @Myks92 ! |
Summary
When using multiple namespaces with Doctrine Migrations, the first one is selected by default. However, I suggest using an interactive namespace selection mode. This can be very convenient in situations where you have several databases within a modular monolithic application, where the migrations are located in each module.
The improvement affects three a commands:
migrations:generate
migrations:diff
migrations:dump-schema
Example
Global config
Modules
Console
Run command without
--no-interaction
:Generated new migration class to path
app/src/Auth/Migration
with namespaceApp\Auth\Migration
Run command with
--no-interaction
:Generated new migration class to path
app/migrations
with namespaceApp\Migration