emildr a révisé ce gist 2 months ago. Aller à la révision
1 file changed, 14 insertions
ef_core_examples.sh(fichier créé)
| @@ -0,0 +1,14 @@ | |||
| 1 | + | # Creates a new migration | |
| 2 | + | dotnet ef migrations add MigrationName --project "../Domain/Domain.csproj" | |
| 3 | + | ||
| 4 | + | # Runs the migrations | |
| 5 | + | dotnet ef database update --project "../Domain/Domain.csproj" | |
| 6 | + | ||
| 7 | + | # Creates a SQL command that matches the migration | |
| 8 | + | dotnet ef migrations script ---project "../Domain/Domain.csproj" | |
| 9 | + | ||
| 10 | + | # Checks for pending model changes | |
| 11 | + | dotnet ef migrations has-pending-model-changes --project "../Domain/Domain.csproj" | |
| 12 | + | ||
| 13 | + | # Removes the most recent migration | |
| 14 | + | dotnet ef migrations remove --project "../Domain/Domain.csproj" | |
Plus récent
Plus ancien