summaryrefslogtreecommitdiff
path: root/src/mailman/database/base.py
diff options
context:
space:
mode:
authorBarry Warsaw2014-10-30 23:12:00 -0400
committerBarry Warsaw2014-10-30 23:12:00 -0400
commit4e19b227ab4c29e59801b38f12f80e1948817053 (patch)
treecbf9334afbb749bbd1c003093eeb5d1acc05cf43 /src/mailman/database/base.py
parentf660e47b51d4134d3424e9696558edb70debc3c8 (diff)
downloadmailman-4e19b227ab4c29e59801b38f12f80e1948817053.tar.gz
mailman-4e19b227ab4c29e59801b38f12f80e1948817053.tar.zst
mailman-4e19b227ab4c29e59801b38f12f80e1948817053.zip
Diffstat (limited to 'src/mailman/database/base.py')
-rw-r--r--src/mailman/database/base.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mailman/database/base.py b/src/mailman/database/base.py
index e360dcedf..beb9c260d 100644
--- a/src/mailman/database/base.py
+++ b/src/mailman/database/base.py
@@ -114,3 +114,9 @@ class SABaseDatabase:
session = sessionmaker(bind=self.engine)
self.store = session()
self.store.commit()
+
+ # XXX BAW Why doesn't model.py _reset() do this?
+ def destroy(self):
+ """Drop all database tables"""
+ from mailman.database.model import Model
+ Model.metadata.drop_all(self.engine)