author | chris <chris@marvin> |
Tue, 20 Jan 2009 10:21:03 +0100 | |
changeset 0 | f907866f0e4b |
permissions | -rw-r--r-- |
1 CREATE DATABASE staroffice_news;
3 CREATE TABLE groups
4 (
5 group_id SERIAL,
6 name VARCHAR(80) NOT NULL,
7 flags INTEGER DEFAULT 0 NOT NULL
8 );
10 CREATE UNIQUE INDEX name_id_index ON groups (name);
12 CREATE TABLE articles
13 (
14 article_id SERIAL,
15 message_id TEXT,
16 header TEXT,
17 body TEXT
18 );
20 CREATE UNIQUE INDEX article_message_index ON articles (message_id(255));
22 CREATE TABLE postings
23 (
24 group_id INTEGER,
25 article_id INTEGER,
26 article_index INTEGER NOT NULL
27 );
29 CREATE UNIQUE INDEX posting_article_index ON postings (article_id);
31 CREATE TABLE subscriptions
32 (
33 group_id INTEGER
34 );
36 CREATE TABLE overview
37 (
38 header TEXT
39 );