mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
25 lines
534 B
PowerShell
25 lines
534 B
PowerShell
param(
|
|
[string]$MigrationName
|
|
)
|
|
|
|
if (!$MigrationName) {
|
|
exit 1
|
|
}
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
|
|
if ($PSScriptRoot) {
|
|
$Root = (Get-Item -Path $PSScriptRoot).Parent.FullName + "\Server"
|
|
}
|
|
else {
|
|
$Root = (Get-Item -Path (Get-Location).Path).Parent.FullName + "\Server"
|
|
}
|
|
|
|
Push-Location $Root
|
|
|
|
dotnet ef migrations add $MigrationName --context "SqliteDbContext"
|
|
dotnet ef migrations add $MigrationName --context "SqlServerDbContext"
|
|
dotnet ef migrations add $MigrationName --context "PostgreSqlDbContext"
|
|
|
|
Pop-Location |