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

Add warning about lost custom operations #2713

Merged
merged 2 commits into from
Sep 29, 2020
Merged

Conversation

dchristensen
Copy link
Contributor

Warning about losing custom operations when resetting/squashing migrations.

Warning about losing custom operations when resetting/squashing migrations.
@smitpatel
Copy link
Member

Does it need to be added to the docs though? If you are deleting "Migrations" folder then you are going to lose all data inside it, custom or not-custom. Before deleting any source code file, you should evaluate if it contains anything you want to save.

@dchristensen
Copy link
Contributor Author

My thinking was that although you are deleting the "Migrations" folder you are expecting EF to re-generate that code (just squashed into a single file). However, if you have added any customizations those will not be re-generated and will be lost. The resulting "squashed" migration will not contain those original customizations and will therefore be different from the expected output.

@smitpatel smitpatel merged commit cf1eec1 into dotnet:master Sep 29, 2020
@smitpatel
Copy link
Member

@dchristensen - Thank you.

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.

2 participants