salix/db/install/boot.sh

29 lines
741 B
Bash
Executable File

#!/bin/bash
export MYSQL_PWD=root
# Dump structure
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 changes for local db
for file in changes/only-local/*.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"