Update the check_migrations_supportBDS script

Doesn't work yet
This commit is contained in:
Martin Pépin 2017-10-26 11:16:12 +02:00
parent 9409b55df5
commit 547d866955

View file

@ -1,12 +1,18 @@
#!/bin/bash
set -e
function mysql_cmd {
mysql -uroot -p$DBPASSWD -e "$*"
}
# Recreate database.
mysql_cmd DROP DATABASE $DBNAME >/dev/null 2>&1
mysql_cmd CREATE DATABASE $DBNAME >/dev/null 2>&1
if [ "$DJANGO_SETTINGS_MODULE" == "gestioCOF.settings.local" -o "_$DJANGO_SETTINGS_MODULE" == "_" ]; then
rm -f db.sqlite3
else
mysql_cmd DROP DATABASE $DBNAME >/dev/null
mysql_cmd CREATE DATABASE $DBNAME >/dev/null
fi
function dj-migrate {
python manage.py migrate -v0 $*
@ -23,9 +29,9 @@ dj-migrate sessions
dj-migrate django_cas_ng
dj-migrate custommail
dj-migrate bda 0010
dj-migrate cof 0008
dj-migrate kfet 0047
dj-migrate bda 0011
dj-migrate cof 0013
dj-migrate kfet 0061
echo "DONE."