diff options
Diffstat (limited to 'create_db.sql')
| -rw-r--r-- | create_db.sql | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/create_db.sql b/create_db.sql index c4202af..638932c 100644 --- a/create_db.sql +++ b/create_db.sql @@ -1,23 +1,17 @@ CREATE TABLE comment ( id serial PRIMARY KEY, - comment text NOT NULL, + comment text NOT NULL, -- URL of the page the comment belongs to, this is the relation between the markdown and this database page_url text, - visitor_url text, + visitor_url text, -- The website the user claims to be from, if they have their own self hosted website nickname text, show_visitor_url bool, - contact text, - show_contact bool, - public bool, + contact text, -- A means of contacting this person, email phone, or similar + show_contact bool, -- True: Publicly show the contact information, False: Site creators eyes only + public bool, -- Indicates if the comment is to be publicly viewable, or if it''s merely for the creator approved bool DEFAULT FALSE, created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP ); -comment on column comment.page_url is 'URL of the page the comment belongs to, this is the relation between the markdown and this database'; -comment on column comment.visitor_url is 'The website the user claims to be from, if they have their own self hosted website'; -comment on column comment.contact is 'A means of contacting this person, email phone, or similar'; -comment on column comment.show_contact is 'True: Publicly show the contact information, False: Site creators eyes only'; -comment on column comment.public is 'Indicates if the comment is to be publicly viewable, or if it''s merely for the creator'; - INSERT INTO comment (comment, page_url, nickname, visitor_url, show_visitor_url, contact, show_contact, public, approved) VALUES ('Hello world!', '/', 'user@node5.net', 'https://blog.node5.net/', TRUE, 'Leave a comment on this blog', TRUE, TRUE, TRUE); @@ -28,4 +22,4 @@ INSERT INTO comment (comment, page_url, nickname, visitor_url, show_visitor_url, VALUES ('Test private comment', '/', NULL, NULL, TRUE, 'Don''t', TRUE, FALSE, TRUE); INSERT INTO comment (comment, page_url, nickname, visitor_url, show_visitor_url, contact, show_contact, public, approved) - VALUES ('Test unapproved comment', '/', NULL, NULL, TRUE, NULL, TRUE, TRUE, FALSE); \ No newline at end of file + VALUES ('Test unapproved comment', '/', NULL, NULL, TRUE, NULL, TRUE, TRUE, FALSE); |
