Update README with migration script.

This commit is contained in:
Kevin Matsubara 2025-04-06 23:35:37 +02:00
parent f630dfac2c
commit b114a696a0

View File

@ -43,6 +43,14 @@ Database-first scaffolding example: *(no need for escape slashes)*
Using `-force` parameter to force overrides when scaffolding. 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 ## Links
* [Entity Framework - Database providers](https://learn.microsoft.com/en-us/ef/core/providers/?tabs=dotnet-core-cli) * [Entity Framework - Database providers](https://learn.microsoft.com/en-us/ef/core/providers/?tabs=dotnet-core-cli)