3 DB_NAME
=${DB_NAME:-AUR}
4 DB_USER
=${DB_USER:-aur}
5 # Password should allow empty definition
7 DB_HOST
=${DB_HOST:-localhost}
8 DATA_FILE
=${DATA_FILE:-dummy-data.sql}
10 echo "Using database $DB_NAME, user $DB_USER, host $DB_HOST"
13 if [ $
(basename $mydir) != "schema" ]; then
14 echo "you must be in the aur/schema directory to run this script"
18 echo "recreating database..."
19 mysql
-h $DB_HOST -u $DB_USER -p$DB_PASS < aur-schema.sql
21 if [ ! -f $DATA_FILE ]; then
22 echo "creating dumy-data..."
23 python3 gendummydata.py
$DATA_FILE
26 echo "loading dummy-data..."
27 mysql
-h $DB_HOST -u $DB_USER -p$DB_PASS $DB_NAME < $DATA_FILE