1
DROP TABLE forum_permissions;
4
DROP TABLE forum_perspectives;
5
DROP SEQUENCE forums_forum_id_seq;
6
DROP SEQUENCE posts_post_id_seq;
8
CREATE TABLE forum_perspectives
10
identity_name varchar(64) PRIMARY KEY,
11
user_name varchar(64) UNIQUE,
12
signature varchar(64) NOT NULL
17
forum_id serial PRIMARY KEY,
18
name varchar(64) NOT NULL,
19
description text NOT NULL,
20
default_access integer NOT NULL
25
post_id serial PRIMARY KEY,
26
forum_id int CONSTRAINT forum_id_posts
27
REFERENCES forums (forum_id),
28
parent_id int NOT NULL,
29
thread_id int NOT NULL,
30
previous_id int NOT NULL,
31
subject varchar(64) NOT NULL,
32
user_name varchar(64) CONSTRAINT user_name_posts
33
REFERENCES forum_perspectives (user_name),
34
posted timestamp NOT NULL,
38
CREATE TABLE forum_permissions
40
user_name varchar(64) NOT NULL,
44
CONSTRAINT perm_key PRIMARY KEY (user_name, forum_id)