-
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
Migrations on releases of different runtimes #6987
Comments
@MikeRavenelle Could you describe your scenario a little more? How are you making the connection strings runtime-specific? Why are aren't you using the same set of migrations for all runtimes? The landscape has also probably changed a bit with the move to MSBuild. Making an app standalone, is now purely a publish time thing; It no longer affects design time. |
If you want to play around with this on the latest bits (to see if it's still a problem), see #7358 for details. |
@bricelam This issue was purely for executing a migrations post publish on the command line. I alternatively wrote code into my application to handle migration instead of relying on the command line tool. The issue was that I could not specify what runtime to generate the migration on. This was primarily an issue when using SQLite since the database file would not be generated for that specific runtime. I have not attempted to see if this was resolved using MSBuild, I will try that out. Thanks. |
Oh interesting. I think your solution of doing this at runtime is the right approach, but let us know if you think it could be improved on the MSBuild version. |
Closing for now. Re-open if you have any suggestions on how we can improve this scenario. |
I am attempting to publish my application to win10-x64 from a Ubuntu 16.04 system. I am able to publish it correctly but how do I go about adding the migration and updating the database?
I tried using --configuration release flag for dotnet ef, but it defaults to ubuntu-16.04 runtime and creates the migration and database for it instead of the win10-x64. I tried adding the dotnet ef commands to a postpublish script but it does it for the compiled debug.
Thanks
Moving here from https://github.com/dotnet/cli/issues/4678
The text was updated successfully, but these errors were encountered: