From 6bed4694e00bbfe3ff65dd00ccb45decf1321d57 Mon Sep 17 00:00:00 2001
From: Matthias Andreas Benkard <code@mail.matthias.benkard.de>
Date: Mon, 27 Feb 2012 00:00:12 +0100
Subject: New subsite: Book Marx.

---
 schema.sql | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index b005380..51d487e 100644
--- a/schema.sql
+++ b/schema.sql
@@ -40,5 +40,26 @@ CREATE TABLE wiki_page_revisions(
   CHECK (format IN ('mulkwiki', 'html5', 'xhtml5', 'markdown', 'textile', 'muse', 'bbcode'))
 );
 
+
+CREATE TABLE bookmarks(
+  id          SERIAL    NOT NULL,
+  owner       INTEGER,
+  date        TIMESTAMP DEFAULT now(),
+  uri         VARCHAR   NOT NULL,
+  title       VARCHAR,
+  description VARCHAR,
+  visibility  VARCHAR,
+  PRIMARY KEY(id),
+  FOREIGN KEY(owner) REFERENCES users,
+  CHECK (visibility IN ('private', 'protected', 'public'))
+);
+
+CREATE TABLE bookmark_tags(
+  bookmark INTEGER NOT NULL,
+  tag      VARCHAR NOT NULL,
+  PRIMARY KEY(bookmark, tag),
+  FOREIGN KEY(bookmark) REFERENCES bookmarks
+);
+
 ROLLBACK;
 --COMMIT;
-- 
cgit v1.2.3

