Browse Source

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>
pull/2589/head
Justin Baur 3 years ago committed by GitHub
parent
commit
6cb236ebcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      dev/ef_migrate.ps1

19
dev/ef_migrate.ps1

@ -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…
Cancel
Save