From eeb343434954ef9f8dc6631db93cfc7bfae70835 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 25 Sep 2019 10:22:02 -0400 Subject: [PATCH] Closes #3347: Extend upgrade script to automatically remove stale content types --- CHANGELOG.md | 1 + upgrade.sh | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4850bf734..101ba9f6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ v2.6.5 (FUTURE) ## Enhancements +* [#3347](https://github.com/netbox-community/netbox/issues/3347) - Extend upgrade script to automatically remove stale content types * [#3352](https://github.com/netbox-community/netbox/issues/3352) - Enable filtering changelog API by `changed_object_id` * [#3524](https://github.com/netbox-community/netbox/issues/3524) - Enable bulk editing of power outlet/power port associations * [#3529](https://github.com/netbox-community/netbox/issues/3529) - Enable filtering circuits list by region diff --git a/upgrade.sh b/upgrade.sh index 793e72cda..d1157e3ca 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -25,6 +25,11 @@ COMMAND="${PYTHON} netbox/manage.py migrate" echo "Applying database migrations ($COMMAND)..." eval $COMMAND +# Delete any stale content types +COMMAND="${PYTHON} netbox/manage.py remove_stale_contenttypes --no-input" +echo "Removing stale content types ($COMMAND)..." +eval $COMMAND + # Collect static files COMMAND="${PYTHON} netbox/manage.py collectstatic --no-input" echo "Collecting static files ($COMMAND)..."