summaryrefslogtreecommitdiff
path: root/archivist/model.py
diff options
context:
space:
mode:
Diffstat (limited to 'archivist/model.py')
-rw-r--r--archivist/model.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/archivist/model.py b/archivist/model.py
index ce360f3..69765f3 100644
--- a/archivist/model.py
+++ b/archivist/model.py
@@ -50,6 +50,11 @@ class Model(Base):
def get(cls, *args, **kwargs):
return cls.query.get(*args, **kwargs)
+def create_all():
+ Model.metadata.create_all(engine)
+
+def drop_all():
+ Model.metadata.drop_all(engine)
class Prefix(Model):
prefix = Column(ty.Unicode, index = True, unique = True)