-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
[RFC] Automatically skip migrations #963
Comments
It is not clear to me what is here the feature request. Can you clarify please? (from your description it seems that what you want already works...) |
For now it works only if manually add |
@grachevko I think you're just doing it wrong. I've worked with multiple databases each with their own distinct schemas and migrations. So this advice comes from experience: Generate separate migrations for each database. The Doctrine migrations comes as a If you are using the orm schema tool to diff your databases to create migrations do it on a per-object manager basis and don't intermingle your schema. I mean, that's just plain wrong IMHO. Instead of using the framework integration create shell scripts to execute the migrations for each database independently. |
@TomHAnderson not much clear. Ofcourse i'm already use two separate command to generate and separate command to migrate. But for now it put all migrations to one directory. When i run migrate for first database it also use migration for second. And second migration command use migration for first database. |
Create separate configs for each database using the .phar file Good luck. |
I think that the approach explained in doctrine/DoctrineMigrationsBundle#311 (comment) can solve your usecase. I see that here the feature request is not clear, thus I'm closing it. If you can specify the exact change request, expected inputs and outcomes, I can certainly re open the ticket. |
Feature Request
Summary
I have two databases with different schemas. After generating migration i need manualy add skip instruction to it, or on execute migration it will try to apply to both databases and it will fail on a one of it.
Like this
Automatically add this skip can be through custom template, but for it doesn't contain placeholder for database name.
So, could we add this placeholder, or maybe another more better solution?
The text was updated successfully, but these errors were encountered: