1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

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>
This commit is contained in:
Justin Baur 2023-01-20 11:28:24 -05:00 committed by GitHub
parent 5cd571df64
commit 6cb236ebcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

19
dev/ef_migrate.ps1 Normal file
View File

@ -0,0 +1,19 @@
#!/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 ---"
}