-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Enable compositional approach of custom migration functionality #17740
Comments
I like it. We have a few other places where we enable composition using services called plugins. This seems to be a good fit for the same pattern. |
How would this usually be implemented though in this case? Overwriting the generator completely and providing this feature in an extensible way instead would always in some fashion break user code in order to work, no? The possibilities it opens up are endless though. |
We’d add a new service type like IMigrationsSqlGeneratorPlugin. You could add multiple of these. If the main generator didn’t handle an operation (or maybe before it tried to) it would see if there was a plug-in that could |
Problem
I just read this article : https://docs.microsoft.com/de-de/ef/core/managing-schemas/migrations/operations
Reading the details about how to implement the generator objects for custom migration functionality it appears to me, that you can only extend migration functionality by overwriting existing one.
Solution
If a compositional approach of this were to exist it would be possible to write many packages which extend the functionality of the MigrationBuilder, which seems like a much better alternative?
The text was updated successfully, but these errors were encountered: