13 lines
396 B
Bash
Executable File
13 lines
396 B
Bash
Executable File
#!/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
|
|
|