From de1fb2b8d047b4d192a45203d347d3136899f985 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 28 Feb 2022 23:50:40 -0800 Subject: [PATCH] check-database-compatibility: Ignore guardian, django.contrib.sites. We can safely ignore the presence of the extra tables that could be left behind in the database from when we had these installed (before Zulip 1.7.0 and 2.0.0, respectively). Signed-off-by: Anders Kaseorg --- scripts/lib/check-database-compatibility.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/lib/check-database-compatibility.py b/scripts/lib/check-database-compatibility.py index 81efe91dd1..02120ee5ad 100755 --- a/scripts/lib/check-database-compatibility.py +++ b/scripts/lib/check-database-compatibility.py @@ -20,6 +20,14 @@ from django.db.migrations.loader import MigrationLoader django.setup() loader = MigrationLoader(connection) missing = set(loader.applied_migrations) + +# Ignore django-guardian, which we installed until 1.7.0~3134 +missing.discard(("guardian", "0001_initial")) + +# Ignore django.contrib.sites, which we installed until 2.0.0-rc1~984. +missing.discard(("sites", "0001_initial")) +missing.discard(("sites", "0002_alter_domain_unique")) + for key, migration in loader.disk_migrations.items(): missing.discard(key) missing.difference_update(migration.replaces)