summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-03-02 17:25:56 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-03-02 17:25:56 +0100
commit5abf2496a9bbc9426c92d73de721ada2b6a5522f (patch)
tree3cd0989e6fa0f03a1566a4eefa65fd868e293846
parente0d749c3fb67bb24314c27437832d3af9db744d2 (diff)
Database schema: Add a global_id column to the article_revisions table in order to simplify data migration.
-rw-r--r--schema.sql4
1 files changed, 3 insertions, 1 deletions
diff --git a/schema.sql b/schema.sql
index 909f6b3..63d227f 100644
--- a/schema.sql
+++ b/schema.sql
@@ -77,11 +77,13 @@ CREATE TABLE article_revisions(
author INTEGER,
format VARCHAR NOT NULL,
status VARCHAR NOT NULL,
+ global_id VARCHAR,
PRIMARY KEY (id),
FOREIGN KEY (article) REFERENCES articles,
FOREIGN KEY (author) REFERENCES users,
CHECK (format IN ('html')),
- CHECK (status IN ('draft', 'published', 'syndicated'))
+ CHECK (status IN ('draft', 'published', 'syndicated')),
+ UNIQUE (global_id)
);
CREATE TABLE article_revision_characteristics(