Skip to content

Commit

Permalink
Removed execution of EF migration scripts from entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
DrizzlyOwl committed Jan 6, 2025
1 parent c1ffde6 commit e07c5aa
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions script/web-docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,4 @@
set -e
set -o pipefail

ConnectionStrings__DefaultConnection=${ConnectionStrings__DefaultConnection:?}

declare -A mysqlconn

for keyvaluepair in $(echo "$ConnectionStrings__DefaultConnection" | sed "s/ //g; s/;/ /g")
do
IFS=" " read -r -a ARR <<< "${keyvaluepair//=/ }"
mysqlconn[${ARR[0]}]=${ARR[1]}
done

echo "Running TramsDbContext database migrations ..."
until /opt/mssql-tools18/bin/sqlcmd -S "${mysqlconn[Server]}" -U "${mysqlconn[UserId]}" -P "${mysqlconn[Password]}" -d "${mysqlconn[Database]}" -C -i /app/SQL/DbMigrationScript.sql -o /app/SQL/DbMigrationScriptOutput.txt
do
cat /app/SQL/DbMigrationScriptOutput.txt
echo "Retrying database migrations ..."
sleep 5
done

echo "Running LegacyTramsDbContext database migrations ..."
until /opt/mssql-tools18/bin/sqlcmd -S "${mysqlconn[Server]}" -U "${mysqlconn[UserId]}" -P "${mysqlconn[Password]}" -d "${mysqlconn[Database]}" -C -i /app/SQL/DbMigrationScriptLegacy.sql -o /app/SQL/DbMigrationScriptOutputLegacy.txt
do
cat /app/SQL/DbMigrationScriptOutputLegacy.txt
echo "Retrying database migrations ..."
sleep 5
done

exec "$@"

0 comments on commit e07c5aa

Please sign in to comment.