1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/trunk/helpers/tbl_mysql6_tmpl.sql Tue Jan 20 10:21:03 2009 +0100
1.3 @@ -0,0 +1,39 @@
1.4 +CREATE DATABASE staroffice_news;
1.5 +
1.6 +CREATE TABLE groups
1.7 +(
1.8 + group_id SERIAL,
1.9 + name VARCHAR(80) NOT NULL,
1.10 + flags INTEGER DEFAULT 0 NOT NULL
1.11 +);
1.12 +
1.13 +CREATE UNIQUE INDEX name_id_index ON groups (name);
1.14 +
1.15 +CREATE TABLE articles
1.16 +(
1.17 + article_id SERIAL,
1.18 + message_id TEXT,
1.19 + header TEXT,
1.20 + body TEXT
1.21 +);
1.22 +
1.23 +CREATE UNIQUE INDEX article_message_index ON articles (message_id(255));
1.24 +
1.25 +CREATE TABLE postings
1.26 +(
1.27 + group_id INTEGER,
1.28 + article_id INTEGER,
1.29 + article_index INTEGER NOT NULL
1.30 +);
1.31 +
1.32 +CREATE UNIQUE INDEX posting_article_index ON postings (article_id);
1.33 +
1.34 +CREATE TABLE subscriptions
1.35 +(
1.36 + group_id INTEGER
1.37 +);
1.38 +
1.39 +CREATE TABLE overview
1.40 +(
1.41 + header TEXT
1.42 +);