From 8551398edca5765b592976e7a49326014beac7c6 Mon Sep 17 00:00:00 2001 From: Jonathan Bourdon Date: Mon, 22 Jul 2024 00:31:01 -0400 Subject: [PATCH] Adds update-databases.sh script --- Hutopy.sln | 1 + update-databases.sh | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 update-databases.sh diff --git a/Hutopy.sln b/Hutopy.sln index feb84bd..cf13057 100644 --- a/Hutopy.sln +++ b/Hutopy.sln @@ -27,6 +27,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution README.md = README.md start-infrastructure.sh = start-infrastructure.sh azure-pipelines.yml = azure-pipelines.yml + update-databases.sh = update-databases.sh EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web", "src\Web\Web.csproj", "{4E4EE20C-F06A-4A1B-851F-C5577796941C}" diff --git a/update-databases.sh b/update-databases.sh new file mode 100644 index 0000000..17a1244 --- /dev/null +++ b/update-databases.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +dotnet ef database update \ + --project src/Web/Web.csproj \ + --startup-project src/Web/Web.csproj \ + --context Hutopy.Web.Features.Messages.Data.MessagingDbContext \ + --configuration Debug \ + --no-build \ + --connection Server=localhost,5432;Database=Hutopy;Uid=sa;Pwd=P@ssword123!; + + dotnet ef database update \ + --project src/Web/Web.csproj \ + --startup-project src/Web/Web.csproj \ + --context Hutopy.Web.Features.Contents.Data.ContentDbContext \ + --configuration Debug \ + --no-build \ + --connection Server=localhost,5432;Database=Hutopy;Uid=sa;Pwd=P@ssword123!;