2 -- Modification to forum table for bbcode support
5 alter table forum add bbcode_uid character varying(15);
13 -- Name: forum_attachment; Type: TABLE; Schema: public; Owner: gforge; Tablespace:
17 CREATE TABLE forum_attachment (
18 attachmentid serial NOT NULL,
19 userid integer DEFAULT 0 NOT NULL,
20 dateline integer DEFAULT 0 NOT NULL,
21 filename character varying(100) DEFAULT ''::character varying NOT NULL,
22 filedata text NOT NULL,
23 visible smallint DEFAULT (0)::smallint NOT NULL,
24 counter smallint DEFAULT (0)::smallint NOT NULL,
25 filesize integer DEFAULT 0 NOT NULL,
26 msg_id integer DEFAULT 0 NOT NULL,
27 filehash character varying(32) DEFAULT ''::character varying NOT NULL
33 -- Name: filehash; Type: CONSTRAINT; Schema: public; Owner: gforge; Tablespace:
36 ALTER TABLE ONLY forum_attachment
37 ADD CONSTRAINT filehash UNIQUE (filehash);
42 -- Name: forum_attachment_key; Type: CONSTRAINT; Schema: public; Owner: gforge; Tablespace:
45 ALTER TABLE ONLY forum_attachment
46 ADD CONSTRAINT forum_attachment_key PRIMARY KEY (attachmentid);
51 -- Name: msg_id; Type: CONSTRAINT; Schema: public; Owner: gforge; Tablespace:
54 ALTER TABLE ONLY forum_attachment
55 ADD CONSTRAINT msg_id UNIQUE (msg_id);
60 -- forum_attachmenttype
65 -- Name: forum_attachmenttype; Type: TABLE; Schema: public; Owner: gforge; Tablespace:
69 CREATE TABLE forum_attachmenttype (
70 extension character varying(20) DEFAULT ''::character varying NOT NULL,
71 mimetype character varying(255) DEFAULT ''::character varying NOT NULL,
72 size integer DEFAULT 0 NOT NULL,
73 width smallint DEFAULT 0::smallint NOT NULL,
74 height smallint DEFAULT 0::smallint NOT NULL,
75 enabled smallint DEFAULT 1::smallint NOT NULL,
76 display smallint DEFAULT 0::smallint NOT NULL
82 -- Data for Name: forum_attachmenttype; Type: TABLE DATA; Schema: public; Owner: gforge
85 INSERT INTO forum_attachmenttype VALUES ('gif', 'a:1:{i:0;s:23:"Content-type: image/gif";}', 20000, 620, 280, 1, 0);
86 INSERT INTO forum_attachmenttype VALUES ('jpeg', 'a:1:{i:0;s:24:"Content-type: image/jpeg";}', 20000, 620, 280, 1, 0);
87 INSERT INTO forum_attachmenttype VALUES ('jpg', 'a:1:{i:0;s:24:"Content-type: image/jpeg";}', 100000, 0, 0, 1, 0);
88 INSERT INTO forum_attachmenttype VALUES ('jpe', 'a:1:{i:0;s:24:"Content-type: image/jpeg";}', 20000, 620, 280, 1, 0);
89 INSERT INTO forum_attachmenttype VALUES ('png', 'a:1:{i:0;s:23:"Content-type: image/png";}', 20000, 620, 280, 1, 0);
90 INSERT INTO forum_attachmenttype VALUES ('txt', 'a:1:{i:0;s:24:"Content-type: plain/text";}', 20000, 0, 0, 1, 2);
91 INSERT INTO forum_attachmenttype VALUES ('doc', 'a:2:{i:0;s:20:"Accept-ranges: bytes";i:1;s:32:"Content-type: application/msword";}', 20000, 0, 0, 1, 0);
92 INSERT INTO forum_attachmenttype VALUES ('pdf', 'a:1:{i:0;s:29:"Content-type: application/pdf";}', 20000, 0, 0, 1, 0);
93 INSERT INTO forum_attachmenttype VALUES ('bmp', 'a:1:{i:0;s:26:"Content-type: image/bitmap";}', 20000, 620, 280, 1, 0);
94 INSERT INTO forum_attachmenttype VALUES ('psd', 'a:1:{i:0;s:29:"Content-type: unknown/unknown";}', 20000, 0, 0, 1, 0);
95 INSERT INTO forum_attachmenttype VALUES ('zip', 'a:1:{i:0;s:29:"Content-type: application/zip";}', 100000, 0, 0, 1, 0);
99 -- Name: forum_attachmenttype_key; Type: CONSTRAINT; Schema: public; Owner: gforge; Tablespace:
102 ALTER TABLE ONLY forum_attachmenttype
103 ADD CONSTRAINT forum_attachmenttype_key PRIMARY KEY (extension);
110 DROP VIEW forum_user_vw;
112 CREATE VIEW forum_user_vw AS
113 SELECT forum.msg_id, forum.group_forum_id, forum.posted_by, forum.subject, forum.body, forum.post_date, forum.is_followup_to, forum.thread_id, forum.has_followups, forum.most_recent_date,
114 forum.bbcode_uid, users.user_name, users.realname FROM forum, users WHERE (forum.posted_by = users.user_id);