Repository navigation
Improvements to migration docs - #2430
Conversation
eed3de0 to
334f0a2
Compare
|
@bricelam @ajcvickers @JeremyLikness this isn't quite ready/proofed yet, but if you feel like taking a look go ahead :) I'll do another pass tomorrow and mark this ready for review. |
| First, you'll have to install the [EF Core command-line tools](xref:core/miscellaneous/cli/index): | ||
|
|
||
| ### Namespaces | ||
| * We generally recommend using the [.NET Core CLI tools](xref:core/miscellaneous/cli/dotnet), which work on all platforms. |
There was a problem hiding this comment.
Is it fair to say we recommend the CLI over PMC as a general rule, unless otherwise? That seems to make sense, from a cross-platform cross-IDE standpoint.
There was a problem hiding this comment.
Yes, I think we should start recommending them.
There was a problem hiding this comment.
Should it be plural because we speak of CLI tools?
| First, you'll have to install the [EF Core command-line tools](xref:core/miscellaneous/cli/index): | ||
|
|
||
| ### Namespaces | ||
| * We generally recommend using the [.NET Core CLI tools](xref:core/miscellaneous/cli/dotnet), which work on all platforms. |
There was a problem hiding this comment.
Yes, I think we should start recommending them.
|
I don't think most applications will hit the idempotent script issues, but if you want to list them:
|
Sounds good. I think I had them there because that's how PMC tab-completes
No. But I think there's a community PR out that adds them.
I'd be fine with hosting them in our docs. How much do they build off the previous ASP.NET tutorials? |
JeremyLikness
left a comment
There was a problem hiding this comment.
...with changes for consideration
| dotnet ef migrations add AddNewTables --idempotent | ||
| ``` | ||
|
|
||
| #### [Visual Studio](#tab/vs) |
There was a problem hiding this comment.
Should something go here about accessing the Package Management Console, for the context of where these commands are run from?
There was a problem hiding this comment.
You mean general information on the PMC and how to install the tools, right? If so, we have the dedicated page on that, and there's the "install the tools" paragraph (with a link to the dedicated page) in the migration's index.html. Do you think we need something more?
|
|
||
| For more information on applying migrations via the command-line tools, see the [EF Core tools reference](xref:core/miscellaneous/cli/index). | ||
|
|
||
| ## Apply migrations at runtime |
There was a problem hiding this comment.
Is there guidance on how to create a standalone executable for this that would be an interim solution until the new bundling features are ready? It seems some companies will build a console app just to host the migrations code and deploy that to run as part of CI/CD separate from the web app consuming the database.
There was a problem hiding this comment.
I'm not specifically aware of people going to those lengths (but maybe @bricelam is)... Typically people either deploy via SQL scripts (which is what we usually recommend), or they just stick Migrate in their program startup, which is what we try to discourage...
I guess that since @bricelam is specifically working on bundles, we may want to hold off for now and just document that once it lands...
| First, you'll have to install the [EF Core command-line tools](xref:core/miscellaneous/cli/index): | ||
|
|
||
| ### Namespaces | ||
| * We generally recommend using the [.NET Core CLI tools](xref:core/miscellaneous/cli/dotnet), which work on all platforms. |
|
Have made the changes here, @bricelam in particular I've redone the tutorial to show |
bricelam
left a comment
There was a problem hiding this comment.
I just love this organization--much easier to grok.
dotnet ef database update,Migrate()(and its pitfalls), etc. This is where we compare the different deployment strategies etc.Closes #814
Closes #694
Closes #2369
Closes #2188
Closes #1048
Part of #691