From c27e3d9838299990eb985c3be0309323add37a8f Mon Sep 17 00:00:00 2001 From: gloomy-ghost Date: Mon, 1 Oct 2018 01:48:19 +0000 Subject: [PATCH] do not use `NOT NULL` with `DEFAULT` at the same time --- isso/db/comments.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/isso/db/comments.py b/isso/db/comments.py index d2181f3..7a44efd 100644 --- a/isso/db/comments.py +++ b/isso/db/comments.py @@ -34,9 +34,9 @@ class Comments: ' created FLOAT NOT NULL, modified FLOAT, mode INTEGER, remote_addr VARCHAR,', ' text VARCHAR, author VARCHAR, email VARCHAR, website VARCHAR,', ' likes INTEGER DEFAULT 0, dislikes INTEGER DEFAULT 0, voters BLOB NOT NULL,', - ' notification INTEGER NOT NULL DEFAULT 0);']) + ' notification INTEGER DEFAULT 0);']) try: - self.db.execute(['ALTER TABLE comments ADD COLUMN notification INTEGER NOT NULL DEFAULT 0;']) + self.db.execute(['ALTER TABLE comments ADD COLUMN notification INTEGER DEFAULT 0;']) except: pass