mirror of
https://github.com/beekeeper-studio/beekeeper-studio.git
synced 2026-03-13 10:12:54 +08:00
18 lines
360 B
Bash
Executable File
18 lines
360 B
Bash
Executable File
#! /bin/bash
|
|
|
|
set -euxo pipefail
|
|
|
|
FILE=/var/opt/mssql/.initialized
|
|
|
|
if test -f "$FILE"; then
|
|
echo "database already initialized"
|
|
else
|
|
sleep 30s
|
|
/opt/mssql-tools/bin/sqlcmd -S localhost -i /docker_init/1_schema.sql -U sa -P "$SA_PASSWORD"
|
|
/opt/mssql-tools/bin/sqlcmd -S localhost -i /docker_init/2_data.sql -U sa -P "$SA_PASSWORD"
|
|
touch "$FILE"
|
|
fi
|
|
|
|
|
|
|