From af2375133ae1fa0e5839f69df70ea95a71b59ebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Tue, 2 Jun 2020 23:42:18 +0200 Subject: [PATCH] MAPG-101 place `mapg migrate` to install and update scripts --- scripts/install.sh | 3 +++ scripts/update.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/scripts/install.sh b/scripts/install.sh index 890a9f5..4d6044d 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -15,6 +15,9 @@ echo "Installing Yarn packages..." echo "Installing MapGuesser DB..." mysql --host=${DB_HOST} --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} < ${ROOT_DIR}/db/mapguesser.sql +echo "Migrating DB..." +(cd ${ROOT_DIR} && ./mapg migrate) + if [ -z "${DEV}" ] || [ "${DEV}" -eq "0" ]; then echo "Minifying JS, CSS and SVG files..." ${ROOT_DIR}/scripts/minify.sh diff --git a/scripts/update.sh b/scripts/update.sh index a61300a..a9ed2a2 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -10,6 +10,9 @@ echo "Installing Composer packages..." echo "Installing Yarn packages..." (cd ${ROOT_DIR}/public/static && yarn install) +echo "Migrating DB..." +(cd ${ROOT_DIR} && ./mapg migrate) + if [ -z "${DEV}" ] || [ "${DEV}" -eq "0" ]; then echo "Minifying JS, CSS and SVG files..." ${ROOT_DIR}/scripts/minify.sh