add jws token
This commit is contained in:
@@ -7,8 +7,18 @@ class DBApplications:
|
||||
default_path = os.getenv("DB_PATH", "instance/dev.db")
|
||||
self.db_path = os.path.abspath(default_path)
|
||||
os.makedirs(os.path.dirname(self.db_path), exist_ok=True)
|
||||
self.drop_table()
|
||||
self.create_table()
|
||||
|
||||
def drop_table(self):
|
||||
with sqlite3.connect(self.db_path, check_same_thread=False) as conn:
|
||||
cursor = conn.cursor()
|
||||
cursor.execute("""
|
||||
DROP TABLE applications;
|
||||
|
||||
""")
|
||||
conn.commit()
|
||||
|
||||
def create_table(self):
|
||||
with sqlite3.connect(self.db_path, check_same_thread=False) as conn:
|
||||
cursor = conn.cursor()
|
||||
|
||||
Reference in New Issue
Block a user