From da82578b625dbe5c50d6ba228919cf7e0b585043 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Wed, 9 Jun 2021 22:25:25 +0000 Subject: update db things --- apioforum/db.py | 4 ++++ apioforum/thread.py | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/apioforum/db.py b/apioforum/db.py index 9db27db..b138aae 100644 --- a/apioforum/db.py +++ b/apioforum/db.py @@ -42,6 +42,10 @@ CREATE TABLE posts ( CREATE INDEX posts_thread_idx ON posts (thread); """, +""" +ALTER TABLE posts ADD COLUMN edited INT NOT NULL DEFAULT 0; +ALTER TABLE posts ADD COLUMN updated TIMESTAMP; +""", ] def init_db(): diff --git a/apioforum/thread.py b/apioforum/thread.py index 23e3cf2..d64055a 100644 --- a/apioforum/thread.py +++ b/apioforum/thread.py @@ -105,9 +105,3 @@ def edit_post(post_id): return render_template("edit_post.html",post=post) -@bp.route("/test") -def test(): - a = "" - for i in range(1,17): - a += f'apiobee {i}
' - return a -- cgit v1.2.3