Browse Source
* 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>pull/2589/head
1 changed files with 19 additions and 0 deletions
@ -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