Skip to content
Snippets Groups Projects

invoke purge sessions only after creating the database tables

Merged Borreguero Calvo, Jose requested to merge purge_sessions_order into next
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
+ 4
4
@@ -22,16 +22,16 @@ echo "Using settings module ${DJANGO_SETTINGS_MODULE}"
if [ "web_reflectivity.settings.develop" = "${DJANGO_SETTINGS_MODULE}" ]; then
# Flush (empty) all database records only for the develop (a.k.a LOCAL) environment
python3 $MANAGE_PY flush --no-input
else
# Purge existing sessions and (possibly) associated identity file records,
# using custom command users.management.command.sessions.py
python3 $MANAGE_PY sessions --purge
fi
# migrate django models
python3 $MANAGE_PY makemigrations --noinput
python3 $MANAGE_PY migrate --noinput
# Purge existing sessions and (possibly) associated identity file records,
# using custom command users.management.command.sessions.py
python3 $MANAGE_PY sessions --purge
# create superuser
python3 $MANAGE_PY adduser --superuser --username "${DJANGO_SUPERUSER_USERNAME}" --password "${DJANGO_SUPERUSER_PASSWORD}" --email "${DJANGO_SUPERUSER_EMAIL}"
Loading