This commit is contained in:
Sivert V. Sæther
2025-02-18 13:56:02 +01:00
commit dc53b1c176
6 changed files with 205 additions and 0 deletions

12
docker/migration.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
[ -z "$1" ] && echo "Usage: $0 [migration name]" && exit 1
set -x
v=`cat Byndle\ Backend/enevo-leads/DockerfileDev | grep mcr.microsoft.com/dotnet/sdk | cut -d: -f2`
docker compose run --rm -T leadsbe bash <<EOF
set -x
dotnet restore
dotnet tool install -g --version '$v' dotnet-ef
export PATH="\$PATH:/root/.dotnet/tools"
dotnet-ef migrations add --context EnevoLeadsContext "$1"
EOF