Datenbank: PowerShell-Skripte für Datenbank-Upgrade und neue Migration
This commit is contained in:
10
ReallifeGamemode.Database/Add-Migration.ps1
Normal file
10
ReallifeGamemode.Database/Add-Migration.ps1
Normal file
@@ -0,0 +1,10 @@
|
||||
Param
|
||||
(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$MigrationName
|
||||
)
|
||||
|
||||
$root = $PSScriptRoot
|
||||
|
||||
dotnet tool update dotnet-ef --global
|
||||
dotnet ef migrations add $MigrationName --project "$root\ReallifeGamemode.Database.csproj" --startup-project "$root\..\ReallifeGamemode.Server\ReallifeGamemode.Server.csproj" --configuration "Database"
|
||||
4
ReallifeGamemode.Database/Update-Database.ps1
Normal file
4
ReallifeGamemode.Database/Update-Database.ps1
Normal file
@@ -0,0 +1,4 @@
|
||||
$root = $PSScriptRoot
|
||||
|
||||
dotnet tool update dotnet-ef --global
|
||||
dotnet ef database update --project "$root\ReallifeGamemode.Database.csproj" --startup-project "$root\..\ReallifeGamemode.Server\ReallifeGamemode.Server.csproj" --configuration "Database"
|
||||
Reference in New Issue
Block a user