From e07c5aadf4da2bef2646c57412a8fb8a2a7d7fd0 Mon Sep 17 00:00:00 2001 From: Ash Davies <3853061+DrizzlyOwl@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:16:41 +0000 Subject: [PATCH] Removed execution of EF migration scripts from entrypoint --- script/web-docker-entrypoint.sh | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/script/web-docker-entrypoint.sh b/script/web-docker-entrypoint.sh index 10760793b..57792dacf 100755 --- a/script/web-docker-entrypoint.sh +++ b/script/web-docker-entrypoint.sh @@ -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 "$@"