diff --git a/db/newsgroup.sql b/db/newsgroup.sql index 4b83777..f349116 100644 --- a/db/newsgroup.sql +++ b/db/newsgroup.sql @@ -1,11 +1,11 @@ begin transaction; create table newsgroup_message ( - id INTEGER PRIMARY KEY NOT NULL, - posted_on DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - sender TEXT NOT NULL, - subject TEXT NOT NULL, - content TEXT NOT NULL + id INTEGER PRIMARY KEY NOT NULL, + created_on DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + sender TEXT NOT NULL, + subject TEXT NOT NULL, + content TEXT NOT NULL ); commit; diff --git a/lib/nntp/tiny/db.py b/lib/nntp/tiny/db.py index 5784e3b..6e202ff 100644 --- a/lib/nntp/tiny/db.py +++ b/lib/nntp/tiny/db.py @@ -12,7 +12,7 @@ class Database(): sql = """ insert into newsgroup_message - (posted_on, sender, subject, content) values (?, ?, ?, ?) + (created_on, sender, subject, content) values (?, ?, ?, ?) """ self.db.execute(sql, (