Added Setup script for a dev database
Script drops the current database 'test_artnet' if present. It then creates a new one and uses the test data script.master
parent
7734ad9deb
commit
f9c8f9e7c9
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCHEMA_CREATION_SCRIPT=./Create_DB.sql
|
||||||
|
TEST_DATA_SCRIPT=./Test_Data.sql
|
||||||
|
|
||||||
|
sudo psql -U postgres -c "DROP DATABASE test_artnet"
|
||||||
|
set -e
|
||||||
|
|
||||||
|
sudo psql -U postgres -c "CREATE DATABASE test_artnet WITH OWNER 'artnet_admin'"
|
||||||
|
sudo psql -U postgres test_artnet < $SCHEMA_CREATION_SCRIPT
|
||||||
|
|
||||||
|
sudo psql -U artnet_editor test_artnet < $TEST_DATA_SCRIPT
|
Loading…
Reference in New Issue