summaryrefslogtreecommitdiff
path: root/ausbutler/interface.py
blob: 95696c128f928e3730be93ba527a353e3a4a5709 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from .db import Session


class Interface:

    def __init__(self):
        self.session = Session()

    def init_db(self, force=False):
        from .model import Base
        if force:
            Base.metadata.drop_all(self.session.get_bind())
        Base.metadata.create_all(self.session.get_bind())