Fix: Tooling-Container actually run migrations
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m58s

This commit is contained in:
2026-03-18 00:36:14 +01:00
parent 7f99284809
commit 291cc195b1

View File

@@ -1,8 +1,4 @@
#!/bin/bash
# Wait for SQL Server to boot up (adjust sleep if needed)
echo "Waiting for SQL Server to start..."
sleep 20s
# Run the three SQL files using sqlcmd
# -S: Server, -U: User, -P: Password (passed via ENV)
echo "Applying SQL files..."
@@ -10,7 +6,7 @@ echo "Applying SQL files..."
for migration in $(ls . | grep -E '\.sql$')
do
echo "Applying $migration."
/opt/mssql-tools/bin/sqlcmd -D $DSN_PASSWORD -i $migration.sql
/opt/mssql-tools/bin/sqlcmd -S mssql-server -U sa -C -P "$DSN_PASSWORD" -i $migration.sql
done
echo "Database initialization complete."