summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorubq323 <ubq323>2021-08-19 23:38:06 +0000
committerubq323 <ubq323>2021-08-19 23:38:06 +0000
commit04419408ad669f9093149697bf9abb7591d29b23 (patch)
tree17c67346a30e1eb5331b322b8365951ac9ab864b
parent17357a3fb5cf603ff79daad644f4a4c0fbe42150 (diff)
database for webhooks
-rw-r--r--apioforum/db.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/apioforum/db.py b/apioforum/db.py
index c0c8c7e..e0d9056 100644
--- a/apioforum/db.py
+++ b/apioforum/db.py
@@ -206,9 +206,18 @@ ALTER TABLE forums ADD COLUMN unlisted NOT NULL DEFAULT 0;
""",
"""
ALTER TABLE role_config ADD COLUMN p_view_forum INT NOT NULL DEFAULT 1;
+""",
"""
+CREATE TABLE webhooks (
+ id INTEGER PRIMARY KEY,
+ type TEXT NOT NULL,
+ url TEXT NOT NULL,
+ forum INTEGER NOT NULL REFERENCES forums(id),
+ inherits INTEGER NOT NULL DEFAULT 0
+);""",
]
+
def init_db():
db = get_db()
version = db.execute("PRAGMA user_version;").fetchone()[0]