concordia-server/db/recreateDb.sh
2019-01-17 12:20:36 +01:00

14 lines
400 B
Bash
Executable File

#!/bin/sh
echo "Recreating database schema..."
PGPASSWORD=concordia psql -U concordia -p 6543 -h localhost concordia_server -f concordia_server.sql
echo "Inserting initial data..."
for initFile in `ls init/*`
do
echo "Init file:" $initFile
PGPASSWORD=concordia psql -U concordia -p 6543 -h localhost concordia_server -f $initFile
done
echo "Concordia server database recreation complete!"