You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In EF7 we're going all in with provider specific migrations, so if I target SQL Server and PostreSql then I need to gen two sets of migrations. Our migrations commands aren't setup to deal with two (or more) sets of migrations though.
We probably need a first class concept of a provider (also needed for reverse engineer) and then we can have migrations identify which provider they are for (possibly in the attribute we use to identity which context they are for).
However, to unblock people from hand-crafting migrations that can run against multiple providers, we'll implement #2258. With that, you could write a migration that looks something like this:
...and once we have everything working we can look at scaffolding something like the conditional code in the final snippet when there are multiple providers registered... but that will presumably be post 7.0.0.
Also worth noting that by having the current provider accessible to the migration code we are already better than EF6, so we easily clear the "EF6 parity" bar.
changed the title [-]Migrations: Need proper story for different migration sets for different providers[/-][+]Migrations: Multiple providers[/+]on May 27, 2015
We already have the flag to allow you to do different things based on the active provider. We think this is enough and we don't need to scaffold for multiple providers.
Activity
rowanmiller commentedon Mar 18, 2015
We should atleast implement enough that we don't have breaking changes later
bricelam commentedon Mar 25, 2015
Parts of this depend on #1904
bricelam commentedon Mar 26, 2015
Notes from today's design meeting:
bricelam commentedon May 22, 2015
I chatted with @rowanmiller today, and we decided to do the following for RTM.
We'll scaffold migrations that are specific to the active provider. For example, given the following model...
...the following migration would be generated if SQL Server was the active provider at design-time.
However, to unblock people from hand-crafting migrations that can run against multiple providers, we'll implement #2258. With that, you could write a migration that looks something like this:
rowanmiller commentedon May 22, 2015
...and once we have everything working we can look at scaffolding something like the conditional code in the final snippet when there are multiple providers registered... but that will presumably be post 7.0.0.
Also worth noting that by having the current provider accessible to the migration code we are already better than EF6, so we easily clear the "EF6 parity" bar.
[-]Migrations: Need proper story for different migration sets for different providers[/-][+]Migrations: Multiple providers[/+]bricelam commentedon May 27, 2015
The investigation work here is done; I have enough context to avoid breaking changes in the future. We can move this issue to the backlog now.
rowanmiller commentedon Jan 13, 2017
We already have the flag to allow you to do different things based on the active provider. We think this is enough and we don't need to scaffold for multiple providers.