From e35ab924d68fcf47589c2486bf5538155ea7b838 Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Thu, 17 Nov 2022 14:36:27 -0600 Subject: [PATCH] fix: deal with post 9.0.0 database dumps --- docker/scripts/app-init.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/scripts/app-init.sh b/docker/scripts/app-init.sh index 94a123236..cc0fd2578 100755 --- a/docker/scripts/app-init.sh +++ b/docker/scripts/app-init.sh @@ -139,6 +139,9 @@ else fi fi +# We may be starting with a post 9.0.0 deploy dump, so run the migrations again before switching engines to catch any pre-postgres migrations that may be merged in from main post 9.0.0 (and any that are specific to feat/postgres that need to run before we switch engines) +/usr/local/bin/python $WORKSPACEDIR/ietf/manage.py migrate --settings=settings_local || true + echo "DEBUGGING pt 2 - this should say mysqldb" grep "DATA" $WORKSPACEDIR/ietf/settings_local.py cat $WORKSPACEDIR/ietf/settings_local.py | sed 's/from ietf.settings_mysqldb import DATABASES/from ietf.settings_postgresqldb import DATABASES/' > /tmp/settings_local.py && mv /tmp/settings_local.py $WORKSPACEDIR/ietf/settings_local.py