Fix: Tooling-Container actually run migrations
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m58s
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m58s
This commit is contained in:
@@ -1,8 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# Run the three SQL files using sqlcmd
|
||||||
# -S: Server, -U: User, -P: Password (passed via ENV)
|
# -S: Server, -U: User, -P: Password (passed via ENV)
|
||||||
echo "Applying SQL files..."
|
echo "Applying SQL files..."
|
||||||
@@ -10,7 +6,7 @@ echo "Applying SQL files..."
|
|||||||
for migration in $(ls . | grep -E '\.sql$')
|
for migration in $(ls . | grep -E '\.sql$')
|
||||||
do
|
do
|
||||||
echo "Applying $migration."
|
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
|
done
|
||||||
|
|
||||||
echo "Database initialization complete."
|
echo "Database initialization complete."
|
||||||
|
|||||||
Reference in New Issue
Block a user