1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-26 17:37:36 +01:00
bitwarden-server/dev/ef_migrate.ps1
Justin Baur 6cb236ebcb
Add Tool For Adding EF Migrations (#2576)
* Add Tool For Adding EF Migrations

* Update dev/ef_migrate.ps1

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2023-01-20 11:28:24 -05:00

20 lines
393 B
PowerShell

#!/usr/bin/env pwsh
param (
[Parameter(Mandatory)]
$Name
)
dotnet tool restore
$providers = @{
MySql = "../util/MySqlMigrations"
Postgres = "../util/PostgresMigrations"
Sqlite = "../util/SqliteMigrations"
}
foreach ($key in $providers.keys) {
Write-Output "--- START $key ---"
dotnet ef migrations add $Name -s $providers[$key]
Write-Output "--- END $key ---"
}