From 6cb236ebcb2c4f40df5c6dd9c2bda1b13dbb53c6 Mon Sep 17 00:00:00 2001 From: Justin Baur <19896123+justindbaur@users.noreply.github.com> Date: Fri, 20 Jan 2023 11:28:24 -0500 Subject: [PATCH] Add Tool For Adding EF Migrations (#2576) * Add Tool For Adding EF Migrations * Update dev/ef_migrate.ps1 Co-authored-by: Oscar Hinton Co-authored-by: Oscar Hinton --- dev/ef_migrate.ps1 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 dev/ef_migrate.ps1 diff --git a/dev/ef_migrate.ps1 b/dev/ef_migrate.ps1 new file mode 100644 index 000000000..97e993934 --- /dev/null +++ b/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 ---" +}