diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-03-02 16:19:50 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-03-02 16:19:50 +0100 |
commit | 2d698a74f90b0915dd8c2e3e42ce0f21d0a7bd1c (patch) | |
tree | e4da3067dde6aedb30436d28ec5701b701fcacfc /schema.sql | |
parent | dd5772e4b88dd41e210a4b789a52ae8656e5f1fd (diff) |
Add comment support to article template, add support for multiple page templates.
Diffstat (limited to 'schema.sql')
-rw-r--r-- | schema.sql | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -40,11 +40,20 @@ CREATE TABLE login_certificates( FOREIGN KEY ("user") REFERENCES users ); -CREATE TABLE articles( - id SERIAL NOT NULL, +CREATE TABLE article_types( + id SERIAL NOT NULL, + name VARCHAR, + page_template VARCHAR, PRIMARY KEY (id) ); +CREATE TABLE articles( + id SERIAL NOT NULL, + type INTEGER NOT NULL, + PRIMARY KEY (id), + FOREIGN KEY (type) REFERENCES article_types +); + CREATE TABLE article_aliases( alias VARCHAR NOT NULL, article INTEGER NOT NULL, @@ -66,11 +75,13 @@ CREATE TABLE article_revisions( title VARCHAR NOT NULL, content VARCHAR NOT NULL, author INTEGER, - format varchar NOT NULL, + format VARCHAR NOT NULL, + status VARCHAR NOT NULL, PRIMARY KEY (id), FOREIGN KEY (article) REFERENCES articles, FOREIGN KEY (author) REFERENCES users, - CHECK (format IN ('html')) + CHECK (format IN ('html')), + CHECK (status IN ('draft', 'published', 'syndicated')) ); CREATE TABLE article_revision_characteristics( |