Skip to content
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

One migration set with annotation never works with ef core 3 #22824

Closed
ajcvickers opened this issue Sep 28, 2020 · 0 comments
Closed

One migration set with annotation never works with ef core 3 #22824

ajcvickers opened this issue Sep 28, 2020 · 0 comments
Labels
closed-no-further-action The issue is closed and no further action is planned. customer-reported

Comments

@ajcvickers
Copy link
Member

Moved from discussion 21688.

Question

From @hanidraidi

I tried using the same migration set for multiple database providers, and that worked out with .net core 2, and in .net core 3 and ef core 3, it does not work as it adds a .hasColumnType() to migration Design class for each migration, and the column type varies from database provider to another, which makes the migration fail when trying to apply it at a different database from the one it was used in the dbcontext when creating the migration.
Is there a way to use same migration set for different database providers in .net core 3, or this feature is no longer available?

Kind Regards,
Hani Draidi


Replies

From @ajcvickers

@hanidraidi See #16406


From @hanidraidi

@ajcvickers
So, Does this mean that one migration set for multiple database providers is no longer available with ef-core post-3.0?


From @ajcvickers

In essence, yes. In theory you will still be able to do it, but the amount of code that will need to be conditional will increase. Also, when evolving this further we will be looking at improving the experience for parallel sets of migrations, rather than a single set with conditional code.


From @hanidraidi

@ajcvickers
Many Thanks for the elaboration.

Kind Regards,
Hani

@ajcvickers ajcvickers added closed-no-further-action The issue is closed and no further action is planned. customer-reported labels Sep 28, 2020
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-no-further-action The issue is closed and no further action is planned. customer-reported
Projects
None yet
Development

No branches or pull requests

1 participant