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

Update dotnet.md #3119

Merged
merged 2 commits into from
Feb 27, 2021
Merged

Update dotnet.md #3119

merged 2 commits into from
Feb 27, 2021

Conversation

Rick-Anderson
Copy link
Contributor

This took a long time to find when using Down.

Per MS style guide avoid parenthetical expressions (they're hard to read in English (and impossible (nearly) to MT (Machine Translate))) :)

This took a long time to find when using `Down`.

Per MS style guide avoid parenthetical expressions (they're hard to read in English (and impossible (nearly) to MT (Machine Translate))) :)
Co-authored-by: Shay Rojansky <roji@roji.org>
@roji roji merged commit 566433d into master Feb 27, 2021
@ajcvickers
Copy link
Member

@bricelam Is this change correct? Removing a migration doesn't cause Down to be called, does it?

@bricelam
Copy link
Contributor

bricelam commented Mar 12, 2021

This part isn't correct:

Removes...by calling the Down method

We only execute the operations described in the Down method if the user tells us to. (By confirmation or by specifying --force) And, it's not related to rolling back the code changes.

@roji
Copy link
Member

roji commented Mar 13, 2021

Sorry, I was focusing on the language here and missed this.

Submitted #3156 to fix this, @bricelam is that correct?

FWIW I know we've discussed this before, though I still find it odd for --force to do something different from what the command does without it (with it we touch the database, without it we don't). From my Unix mindset, --force is supposed to do the exact same thing, just to force the tool to complete silently without aborting on risky situations. Hopefully I'm not still misunderstanding.

@bricelam
Copy link
Contributor

--force will skip checking the database. This might in turn skip reverting the migration. But we also warn during --force that you might have to manually revert the database if the migration was applied. In other words, --force avoids some built-in guardrails that might be preventing you from removing the C# code for the migrations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants