From 5a6bb80ce4a2d6cbdee7de190a3c7e4b58562b8e Mon Sep 17 00:00:00 2001 From: colin Date: Wed, 24 May 2023 08:29:56 +0800 Subject: [PATCH] fix(migrations): update build-aspnetcore-ef-update.ps1 --- build/build-aspnetcore-common.ps1 | 11 +++++++++++ build/build-aspnetcore-ef-update.ps1 | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/build/build-aspnetcore-common.ps1 b/build/build-aspnetcore-common.ps1 index 0b77a9844..8eae20a1c 100644 --- a/build/build-aspnetcore-common.ps1 +++ b/build/build-aspnetcore-common.ps1 @@ -25,6 +25,17 @@ $solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.Mic $solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.SingleProject.sln" } $solutionArray += [PsObject]@{ File = $rootFolder + "/../gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/LINGYUN.MicroService.Internal.ApiGateway.sln" } +[PsObject[]]$migrationArray = @() +$migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator" } +$migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.Platform.DbMigrator" } +$migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator" } +$migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator" } +$migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator" } +$migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator" } +$migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator" } +$migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator" } +#$migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator" } + Write-host "" Write-host ":::::::::::::: !!! You are in development mode !!! ::::::::::::::" -ForegroundColor red -BackgroundColor yellow Write-host "" \ No newline at end of file diff --git a/build/build-aspnetcore-ef-update.ps1 b/build/build-aspnetcore-ef-update.ps1 index 1b6a3e55b..eaabea654 100644 --- a/build/build-aspnetcore-ef-update.ps1 +++ b/build/build-aspnetcore-ef-update.ps1 @@ -1,9 +1,9 @@ . "./build-aspnetcore-common.ps1" # Build all solutions -foreach ($service in $serviceArray) { - Set-Location $service.Path - dotnet ef database update +foreach ($migration in $migrationArray) { + Set-Location $migration.Path + dotnet run } Set-Location $rootFolder \ No newline at end of file