From fd87dbade6aee9c8c69a3a3ae65758fb71e87118 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Wed, 2 Mar 2011 19:15:52 +0100 Subject: Database schema: Add more metadata to comments. --- schema.sql | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/schema.sql b/schema.sql index f8faadd..8c2287d 100644 --- a/schema.sql +++ b/schema.sql @@ -65,8 +65,9 @@ CREATE TABLE article_aliases( ); CREATE TABLE comments( - id SERIAL NOT NULL, - article INTEGER NOT NULL, + id SERIAL NOT NULL, + article INTEGER NOT NULL, + global_id VARCHAR, PRIMARY KEY (id), FOREIGN KEY (article) REFERENCES articles ); @@ -106,14 +107,16 @@ CREATE TABLE article_revision_parenthood( ); CREATE TABLE comment_revisions( - id SERIAL NOT NULL, - comment INTEGER NOT NULL, - date TIMESTAMP DEFAULT now(), - content VARCHAR NOT NULL, - author INTEGER, - format VARCHAR NOT NULL, - status VARCHAR NOT NULL, - article_revision INTEGER, + id SERIAL NOT NULL, + comment INTEGER NOT NULL, + date TIMESTAMP DEFAULT now(), + content VARCHAR NOT NULL, + author INTEGER, + submitter_ip INET, + submitter_user_agent VARCHAR, + format VARCHAR NOT NULL, + status VARCHAR NOT NULL, + article_revision INTEGER, PRIMARY KEY (id), FOREIGN KEY (comment) REFERENCES comments, FOREIGN KEY (author) REFERENCES users, -- cgit v1.2.3