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:
parent
5cd571df64
commit
6cb236ebcb
19
dev/ef_migrate.ps1
Normal file
19
dev/ef_migrate.ps1
Normal 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 ---"
|
||||
}
|
Loading…
Reference in New Issue
Block a user