-
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
Running EF Core Migrations from DLLs on Linux #13339
Comments
@mmillican The concept should be the same as is described in the post. Are you asking for help converting the script to run in your Linux shell? |
@ajcvickers I can probably convert the script (at least the basics) if someone hasn't already. My other question though is: how do I get the EF tools installed on the instance? EF isn't available as a global tool and these instances wouldn't have the Nuget packages installed on them. |
From the blog post
That's it. Just copy over |
[Edited as I finally found the Are there any plans for making this easier in the future? This is incredibly frustrating and annoying. |
@benday Do you have anything describing more specifically how to do this on Linux, or would you consider adding it to your post? |
@ajcvickers @benday I ended up figuring this out yesterday and plan on doing a blog post soon. Would be great to have this support built in. |
Note, the easiest way to get the command to run is to use
|
@ajcvickers, I'd be happy to share more info about doing migration deploys with Linux. How can I help? What do you think is missing? What are you finding difficult and/or confusing? |
I'm having the same issue, @mmillican did you create the blogpost yet? |
@jcmiron I'm hoping to have it ready this weekend. |
@livarcocc @TheRealPiotrP Issue https://github.com/dotnet/cli/issues/2243 discouraged the use of |
Yep. Don't try this at home, folks. It's dangerous, but we know what we're doing. .NET CLI team supervision is required. 😉 |
So can I publish it in a blog post? |
The dirty details: We're effectively running But yes, it's safe to run the command you see in |
@bricelam you are giving away all our secrets man. @scottaddie I am not sure this warrants document this or not. This is actually part of the host itself and not really the CLI, so I will let @jeffschwMSFT comment on it. |
Absolutely. |
@scottaddie I wouldn't mention it in the docs. This is just implementation detail of the |
Note, our recommended approach is to generate SQL script on the dev box and run those on the server instead. At least until we have a good delivery mechanism for an EF tool that can run directly against assemblies. |
Thanks for the feedback @bricelam, @scottaddie and @livarcocc. Currently trying to update the post I have to mention these recommendations. |
The blog post has been published. If the team has any feedback, please let me know. Thanks for the help all! cc @jcmiron |
Thanks everyone for your input and contributions here. I'm closing this out now in favor of some remaining follow-up items on the relevant docs issue: dotnet/EntityFramework.Docs#807 |
I'm currently working on setting up a build to our Linux EC2 instances via Code Deploy and have been having some issues getting EF Migrations to run.
Running
dotnet ef database update -p ProjectName.Backend.Core.dll -s ProjectName.Backend.Api.dll
produces the following:What do I need to get migrations to run on Linux from a published output?
I've seen Ben Day's post about deploying from DLLs for EF Core 2.1, but this is for more of a Windows environment (both the batch script and file locations).
The text was updated successfully, but these errors were encountered: