diff --git a/debian/postinst b/debian/postinst index 75304c1a..d2fcc57d 100755 --- a/debian/postinst +++ b/debian/postinst @@ -1,18 +1,19 @@ #!/bin/bash set -e GET_VERSION_SCRIPT=" from pkg_resources import get_distribution print(get_distribution('swh.web').version)" if [ -f /var/lib/swh/web.sqlite3 ]; then echo "Software Heritage production db detected; running migrations" SWH_WEB_VERSION=$(python3 -c "$GET_VERSION_SCRIPT") if [ "$SWH_WEB_VERSION" == "0.0.279" ] then # use fake migrations after django app labels renaming in v0.0.279 MIGRATE_EXTRA_OPTS="--fake" fi + django-admin rename_app --settings=swh.web.settings.production swh_web_common swh_web_save_code_now django-admin migrate --settings=swh.web.settings.production $MIGRATE_EXTRA_OPTS fi