Specific Rollback command line tool
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with the existing dotnet ef database update -migration NameOfMigration behavior and the migration version recorded in the _Migrations table. Review how rollback and data-loss handling should work with the SQL Server provider, then define the scope of a dedicated dotnet ef database rollback command and a way to inspect the current migration version.
Written by the indexing model from the issue text.
Description
Describe what is not working as expected.
If I attempt to run a dotnet ef database update -migration NameOfMigration and it would result in dataloss (i.e it wants to perform a Down action), action should be cancelled to prevent possible accidental dataloss.
Suggestion:
Instead introduce a dotnet ef database rollback command specifically for rolling back migrations.
This is how some other db management tools work, like ActiveRecord in rails.
This is especially useful as there appears to be no CLI tool to check the current DB migration version, based on the _Migrations table that is updated by EF. Checking the current DB version at the moment requires I open a new code window, set syntax to SQL, connect to the DB and issue the select command to the appropriately named table
Further technical details
EF Core version: Entity Framework Core .NET Command-line Tools, 2.2.4-servicing-10062
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: macOS 10.14.5
IDE: Code + Terminal
- Dominant language
- C#
- Stars
- 14.8k
- Forks
- 3.4k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 134
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/efcore
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
customer-reported
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
area-cosmos area-vector-search
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
area-cosmos
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
area-tools needs-design
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100