summaryrefslogtreecommitdiff
path: root/src/mailman/database/model.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/database/model.py')
-rw-r--r--src/mailman/database/model.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mailman/database/model.py b/src/mailman/database/model.py
index f8a15162c..06705dfe9 100644
--- a/src/mailman/database/model.py
+++ b/src/mailman/database/model.py
@@ -44,6 +44,8 @@ class ModelMeta:
with contextlib.closing(config.db.engine.connect()) as connection:
transaction = connection.begin()
try:
+ # Delete all the tables in reverse foreign key dependency
+ # order. http://tinyurl.com/on8dy6f
for table in reversed(Model.metadata.sorted_tables):
connection.execute(table.delete())
except: