From b114a696a0dcbb275620f6e35b4c3b20f7c2331a Mon Sep 17 00:00:00 2001 From: Kevin Matsubara Date: Sun, 6 Apr 2025 23:35:37 +0200 Subject: [PATCH] Update README with migration script. --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 00ba677..1b0ab0b 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,14 @@ Database-first scaffolding example: *(no need for escape slashes)* Using `-force` parameter to force overrides when scaffolding. +Remove last migration: + +`dotnet ef migrations remove --startup-project ./ --project ../EntityFrameworkCore.Data` + +Create migration script (This generates SQL of all the migrations). Add the `--idempotent` parameter to make it idempotent. This applies only the changes not already made. You can also specify migration names to only generate between specific migrations. + +`dotnet ef migrations script --startup-project ./ --project ../EntityFrameworkCore.Data` + ## Links * [Entity Framework - Database providers](https://learn.microsoft.com/en-us/ef/core/providers/?tabs=dotnet-core-cli)