cvs: pear /Forum/docs forum.pgsql
| From: | Thomas V.V.Cox | Date: | Fri, 19 Oct 2001 15:24:44 +0000 |
| Subject: | cvs: pear /Forum/docs forum.pgsql | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1039@lists.php.net to get a copy of this message | ||
cox Fri Oct 19 11:24:44 2001 EDT
Added files:
/pear/Forum/docs forum.pgsql
Log:
Forum table definitions for PostgreSQL (tested with version 7.x)
Contributed by Francis Romera <francis@vulcanonet.com>
Index: pear/Forum/docs/forum.pgsql
+++ pear/Forum/docs/forum.pgsql
/**
* Postgres table definitions by Francisco V. romera
* <francis@vulcanonet.com>
*/
/**
* Table structure for table 'phorum4'
*/
CREATE SEQUENCE phorum4_seq INCREMENT 1 START 1;
CREATE TABLE phorum4 (
forum_id int NOT NULL DEFAULT NEXTVAL('phorum4_seq'),
name varchar(50) NOT NULL default '',
active varchar(1) NOT NULL default 'N' CHECK (active IN ('Y','N')),
description varchar(255) NOT NULL default '',
parent_id smallint NOT NULL default '0',
table_name varchar(50) NOT NULL default 'phorum4',
html varchar(1) NOT NULL default 'N' CHECK (html IN ('Y','N')),
default_skin varchar(100) NOT NULL default 'simple',
is_folder varchar(1) NOT NULL default 'N' CHECK (is_folder IN
('Y','N')),
count int NOT NULL default '0',
max_id int NOT NULL default '0',
last_post int NOT NULL default '0',
PRIMARY KEY (forum_id)
);
CREATE INDEX name_pkey ON phorum4 (name);
CREATE INDEX active_pkey ON phorum4 (active);
/**
* Dumping data for table 'phorum4'
*/
INSERT INTO phorum4 VALUES (1,'Phorum4 default
installation','N','',1,'phorum4','N','simple','Y',1,154,987416155);
INSERT INTO phorum4 VALUES (2,'Phorum 4 Installation','Y','Post any
questions regarding installing
here.',1,'phorum4','N','simple','N',124,1555,991161283);
INSERT INTO phorum4 VALUES (3,'Phorum 4 Development','Y','Wan\'t to do
something with your site or you found a
bug?',1,'phorum4','N','simple','N',111,1599,991264935);
INSERT INTO phorum4 VALUES (4,'Phorum 4 Demo','Y','Use this forum for
testing.',1,'phorum4','N','simple','N',1308,1601,991267398);
INSERT INTO phorum4 VALUES (5,'Phorum 4 Skins','Y','Want to make a skin?
Ask questions
here!',1,'phorum4','N','simple','N',58,1602,991267549);
/**
* Table structure for table 'phorum4_user'
*/
CREATE SEQUENCE phorum4_user_seq INCREMENT 1 START 1;
CREATE TABLE phorum4_user (
user_id INT NOT NULL DEFAULT NEXTVAL('phorum4_user_seq'),
user_name varchar(15) NOT NULL default '',
author varchar(30) NOT NULL default '',
pass varchar(32) NOT NULL default '',
homepage varchar(100) NOT NULL default '',
email varchar(50) NOT NULL default '',
image varchar(1) NOT NULL default '',
signature varchar(255) NOT NULL default '',
PRIMARY KEY (user_id)
);
/**
* Table structure for table 'phorum4_headers'
*/
CREATE SEQUENCE phorum4_headers_seq INCREMENT 1 START 1;
CREATE TABLE phorum4_headers (
message_id INT NOT NULL DEFAULT NEXTVAL('phorum4_headers_seq'),
forum_id SMALLINT NOT NULL default '0',
thread_id INT NOT NULL default '0',
parent_id INT NOT NULL default '0',
thread_updated INT NOT NULL default '0',
timestamp INT NOT NULL default '0',
author varchar(37) NOT NULL default '',
user_id INT NOT NULL default '0',
subject varchar(50) NOT NULL default '',
email varchar(50) NOT NULL default '',
host varchar(50) NOT NULL default '',
email_reply varchar(1) NOT NULL default 'N' CHECK (email_reply IN
('N','Y')),
approved varchar(1) NOT NULL default 'Y' CHECK (approved IN
('N','Y')),
PRIMARY KEY (message_id)
);
CREATE INDEX author_pkey ON phorum4_headers (author);
CREATE INDEX user_id_pkey ON phorum4_headers (user_id);
CREATE INDEX datestamp_pkey ON phorum4_headers (timestamp);
CREATE INDEX thread_id_pkey ON phorum4_headers (thread_id);
CREATE INDEX parent_id_pkey ON phorum4_headers (parent_id);
CREATE INDEX approved_pkey ON phorum4_headers (approved);
CREATE INDEX thread_updated_pkey ON phorum4_headers (thread_updated);
/**
* Table structure for table 'phorum4_bodies'
*/
CREATE SEQUENCE phorum4_bodies_seq INCREMENT 1 START 1;
CREATE TABLE phorum4_bodies (
message_id INT NOT NULL DEFAULT NEXTVAL('phorum4_bodies_seq'),
body TEXT NOT NULL,
PRIMARY KEY (message_id)
);
/**
* Table structure for table 'phorum4_settings'
*/
CREATE TABLE phorum4_settings (
name varchar(50) NOT NULL default '',
module varchar(50) NOT NULL default '',
description varchar(255) NOT NULL default '',
type varchar(1) NOT NULL default 'text' CHECK (type IN
('text','select')),
content varchar(255),
def varchar(255),
PRIMARY KEY (name)
);