diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-03-15 18:58:45 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-03-15 18:58:45 +0100 |
commit | 3a3cb557ca56e9d0678bb1f3477a37b740b20af1 (patch) | |
tree | a5aaa7f65dd5ddb1cf84cf793c564b0444a762b0 | |
parent | 5f927ed417f9dcd74297180ddadbe5d73c5f28a8 (diff) |
Database schema: Fix column order.
-rw-r--r-- | mulkcms.lisp | 17 | ||||
-rw-r--r-- | schema.sql | 4 |
2 files changed, 14 insertions, 7 deletions
diff --git a/mulkcms.lisp b/mulkcms.lisp index 9294e0d..3acb9a1 100644 --- a/mulkcms.lisp +++ b/mulkcms.lisp @@ -341,12 +341,17 @@ (defun paramify-comment (comment-revision-data) (destructuring-bind (crid comment date content author format status - article-revision &rest args) + article-revision submitter-ip user-agent + &rest args) comment-revision-data - (declare (ignore args crid status format)) + (declare (ignore args crid status format submitter-ip user-agent)) (destructuring-bind (author-name author-website) - (query "SELECT name, website FROM users WHERE id = $1" author :row) - (let ((article (query "SELECT article FROM article_revisions WHERE id = $1" + (query "SELECT name, website FROM users WHERE id = $1" + author + :row) + (let ((article (query "SELECT article + FROM article_revisions + WHERE id = $1" article-revision :single!))) (list :publishing-date date @@ -744,7 +749,9 @@ WHERE articles.id = $1" article :single!)) - (article-params (find-article-params article characteristics t)) + (article-params (find-article-params article + characteristics + t)) (page-template (template page-template-name)) (template-params (list :title (getf article-params :title) :root *base-uri* @@ -116,11 +116,11 @@ CREATE TABLE comment_revisions( 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, + submitter_ip INET, + submitter_user_agent VARCHAR, PRIMARY KEY (id), FOREIGN KEY (comment) REFERENCES comments, FOREIGN KEY (author) REFERENCES users, |