salix/db/install/boot.sh

25 lines
691 B
Bash
Executable File

#!/bin/bash
export MYSQL_PWD=root
# Dump structure
echo "[INFO] -> Imported ./dump/truncateAll.sql"
mysql -u root -f < ./dump/truncateAll.sql
echo "[INFO] -> Imported ./dump/structure.sql"
mysql -u root -f < ./dump/structure.sql
echo "[INFO] -> Imported ./dump/mysqlPlugins.sql"
mysql -u root -f < ./dump/mysqlPlugins.sql
# Import changes
for file in changes/*.sql; do
echo "[INFO] -> Imported ./$file"
mysql -u root -fc < $file
done
# Import fixtures
echo "[INFO] -> Imported ./dump/dumpedFixtures.sql"
mysql -u root -f < ./dump/dumpedFixtures.sql
echo "[INFO] -> Imported ./dump/fixtures.sql"
mysql -u root -f < ./dump/fixtures.sql
echo "[INFO] -> Dumped database"