fix: deal with post 9.0.0 database dumps

This commit is contained in:
Robert Sparks 2022-11-17 14:36:27 -06:00
parent 502376e7b2
commit e35ab924d6
No known key found for this signature in database
GPG key ID: 6E2A6A5775F91318

View file

@ -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