File: 20050824.sql

package info (click to toggle)
fusionforge 5.3.2%2B20141104-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 60,472 kB
  • sloc: php: 271,846; sql: 36,817; python: 14,575; perl: 6,406; sh: 5,980; xml: 4,294; pascal: 1,411; makefile: 911; cpp: 52; awk: 27
file content (33 lines) | stat: -rw-r--r-- 2,236 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
alter table forum_attachment DROP CONSTRAINT forum_attachment_key;
alter table forum_attachment DROP CONSTRAINT msg_id;

alter table forum_attachment add PRIMARY KEY (attachmentid);
alter table forum_attachment alter userid set DEFAULT 100;

ALTER TABLE forum_attachment ADD FOREIGN KEY (msg_id) REFERENCES forum(msg_id) ON DELETE CASCADE;
ALTER TABLE forum_attachment ADD FOREIGN KEY (userid) REFERENCES users(user_id) ON DELETE SET DEFAULT;

DROP TABLE forum_attachmenttype;

CREATE TABLE forum_attachment_type (
    extension character varying(20) DEFAULT ''::character varying NOT NULL,
    mimetype character varying(255) DEFAULT ''::character varying NOT NULL,
    size integer DEFAULT 0 NOT NULL,
    width smallint DEFAULT 0::smallint NOT NULL,
    height smallint DEFAULT 0::smallint NOT NULL,
    enabled smallint DEFAULT 1::smallint NOT NULL
);

ALTER TABLE ONLY forum_attachment_type ADD PRIMARY KEY (extension);

INSERT INTO forum_attachment_type VALUES ('gif', 'a:1:{i:0;s:23:"Content-type: image/gif";}', 20000, 620, 280, 1);
INSERT INTO forum_attachment_type VALUES ('jpeg', 'a:1:{i:0;s:24:"Content-type: image/jpeg";}', 20000, 620, 280, 1);
INSERT INTO forum_attachment_type VALUES ('jpg', 'a:1:{i:0;s:24:"Content-type: image/jpeg";}', 100000, 0, 0, 1);
INSERT INTO forum_attachment_type VALUES ('jpe', 'a:1:{i:0;s:24:"Content-type: image/jpeg";}', 20000, 620, 280, 1);
INSERT INTO forum_attachment_type VALUES ('png', 'a:1:{i:0;s:23:"Content-type: image/png";}', 20000, 620, 280, 1);
INSERT INTO forum_attachment_type VALUES ('doc', 'a:2:{i:0;s:20:"Accept-ranges: bytes";i:1;s:32:"Content-type: application/msword";}', 20000, 0, 0, 1);
INSERT INTO forum_attachment_type VALUES ('pdf', 'a:1:{i:0;s:29:"Content-type: application/pdf";}', 20000, 0, 0, 1);
INSERT INTO forum_attachment_type VALUES ('bmp', 'a:1:{i:0;s:26:"Content-type: image/bitmap";}', 20000, 620, 280, 1);
INSERT INTO forum_attachment_type VALUES ('psd', 'a:1:{i:0;s:29:"Content-type: unknown/unknown";}', 20000, 0, 0, 1);
INSERT INTO forum_attachment_type VALUES ('zip', 'a:1:{i:0;s:29:"Content-type: application/zip";}', 100000, 0, 0, 1);
INSERT INTO forum_attachment_type VALUES ('txt', 'a:1:{i:0;s:24:"Content-type: plain/text";}', 20000, 0, 0, 1);