From 04419408ad669f9093149697bf9abb7591d29b23 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 19 Aug 2021 23:38:06 +0000 Subject: database for webhooks --- apioforum/db.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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] -- cgit v1.2.3