concordia-server/db/recreateDb.sh

14 lines
400 B
Bash
Raw Normal View History

2015-07-31 14:11:13 +02:00
#!/bin/sh
echo "Recreating database schema..."
2019-01-17 12:20:36 +01:00
PGPASSWORD=concordia psql -U concordia -p 6543 -h localhost concordia_server -f concordia_server.sql
2015-07-31 14:11:13 +02:00
echo "Inserting initial data..."
for initFile in `ls init/*`
do
echo "Init file:" $initFile
2019-01-17 12:20:36 +01:00
PGPASSWORD=concordia psql -U concordia -p 6543 -h localhost concordia_server -f $initFile
2015-07-31 14:11:13 +02:00
done
echo "Concordia server database recreation complete!"