Actualize la base de datos

Plus un script que ejecuta la migracion automaticamente
This commit is contained in:
Daniel Cortés
2019-06-18 00:42:19 -04:00
parent 56cbb1fdeb
commit 507a0bef91
4 changed files with 169 additions and 375 deletions

17
migrate.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
# Ask for password
printf "Pass: "
stty_orig=`stty -g` # save original terminal setting
stty -echo # turn-off echoing.
read PASS # read the password
stty $stty_orig # restore terminal setting.
echo ""
set -e
echo "Ejecutando create.sql"
mysql -u root -p$PASS biblioteca < create.sql
echo "Ejecutando data.sql"
mysql -u root -p$PASS biblioteca < data.sql