salix/db/install/boot.sh

29 lines
741 B
Bash
Raw Normal View History

2018-04-30 06:46:41 +00:00
#!/bin/bash
2018-08-21 11:38:16 +00:00
export MYSQL_PWD=root
2018-04-30 06:46:41 +00:00
2019-01-04 12:32:04 +00:00
# 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
2018-04-30 06:46:41 +00:00
2019-01-04 12:32:04 +00:00
# Import changes
2019-02-27 11:03:54 +00:00
for file in changes/*.sql; do
2019-01-04 12:32:04 +00:00
echo "[INFO] -> Imported ./$file"
mysql -u root -fc < $file
done
2019-03-27 07:48:13 +00:00
# Import changes for local db
for file in changes/only-local/*.sql; do
echo "[INFO] -> Imported ./$file"
mysql -u root -fc < $file
done
2019-01-04 12:32:04 +00:00
# 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
2019-01-04 12:32:04 +00:00
echo "[INFO] -> Dumped database"