diff options
Diffstat (limited to 'localserver/initdb.sh')
-rwxr-xr-x | localserver/initdb.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/localserver/initdb.sh b/localserver/initdb.sh index 40358e1..cd014bc 100755 --- a/localserver/initdb.sh +++ b/localserver/initdb.sh @@ -1,5 +1,8 @@ #!/bin/bash +export DIR="$(pwd)" +export VER=$(cat versions/sqlver 2>/dev/null) + cd ../../server-data/sql-files echo Creating db and user... @@ -16,3 +19,8 @@ export CMD="mysql -u evol -pevol evol" echo Creating tables... $CMD <main.sql $CMD <logs.sql + +if [[ -z "${VER}" ]]; then + mkdir ${DIR}/versions + echo "2" >${DIR}/versions/sqlver +fi |