File: schema.Pg

package info (click to toggle)
rtfm 2.0.3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 812 kB
  • ctags: 220
  • sloc: perl: 3,426; sh: 153; makefile: 144
file content (90 lines) | stat: -rw-r--r-- 2,344 bytes parent folder | download | duplicates (2)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

CREATE TABLE FM_Classes (
id SERIAL,
Name varchar(255) NOT NULL DEFAULT '',
Description varchar(255) NOT NULL DEFAULT '',
SortOrder integer NOT NULL DEFAULT 0,
Disabled smallint not null default '0',
Creator integer NOT NULL DEFAULT 0,
Created TIMESTAMP NULL,
LastUpdatedBy integer NOT NULL DEFAULT 0,
LastUpdated TIMESTAMP NULL,
PRIMARY KEY (id)
);


CREATE TABLE FM_ClassCustomFields (
id SERIAL,
Class integer not NULL,
CustomField integer not NULL,
Creator integer NOT NULL DEFAULT 0,
Created TIMESTAMP NULL,
SortOrder smallint not null default '0',
LastUpdatedBy integer NOT NULL DEFAULT 0,
LastUpdated TIMESTAMP NULL,
PRIMARY KEY (id)
);


CREATE TABLE FM_CustomFields (
id SERIAL,
Name varchar(200) NOT NULL DEFAULT '',
Type varchar(200) NOT NULL DEFAULT '',
Description varchar(200) NOT NULL DEFAULT '',
SortOrder integer NOT NULL DEFAULT 0,
Creator integer NOT NULL DEFAULT 0,
Created TIMESTAMP NULL,
LastUpdatedBy integer NOT NULL DEFAULT 0,
LastUpdated TIMESTAMP NULL,
PRIMARY KEY (id)
);
CREATE TABLE FM_Articles (
id SERIAL,
Name varchar(255) NOT NULL DEFAULT '',
Summary varchar(255) NOT NULL DEFAULT '',
SortOrder integer NOT NULL DEFAULT 0,
Class integer NOT NULL DEFAULT 0,
Parent integer NOT NULL DEFAULT 0,
URI varchar(255),
Creator integer NOT NULL DEFAULT 0,
Created TIMESTAMP NULL,
LastUpdatedBy integer NOT NULL DEFAULT 0,
LastUpdated TIMESTAMP NULL,
PRIMARY KEY (id)
);
CREATE TABLE FM_CustomFieldValues (
id SERIAL,
CustomField int NOT NULL,
Name varchar(255) NOT NULL DEFAULT '',
Description varchar(255) NOT NULL DEFAULT '',
SortOrder integer NOT NULL DEFAULT 0,
Creator integer NOT NULL DEFAULT 0,
Created TIMESTAMP NULL,
LastUpdatedBy integer NOT NULL DEFAULT 0,
LastUpdated TIMESTAMP NULL,
PRIMARY KEY (id)
);
CREATE TABLE FM_ArticleCFValues (
id SERIAL,
Article int NOT NULL,
CustomField int NOT NULL,
Content text,
Creator integer NOT NULL DEFAULT 0,
Created TIMESTAMP NULL,
LastUpdatedBy integer NOT NULL DEFAULT 0,
LastUpdated TIMESTAMP NULL,
PRIMARY KEY (id)

);
CREATE TABLE FM_Transactions (
id SERIAL,
Article integer NOT NULL DEFAULT 0,
ChangeLog text NOT NULL DEFAULT '',
Type varchar(64) NOT NULL DEFAULT '',
Field varchar(64) NOT NULL DEFAULT '',
OldContent text NOT NULL DEFAULT '',
NewContent text NOT NULL DEFAULT '',
Creator integer NOT NULL DEFAULT 0,
Created TIMESTAMP NULL,
PRIMARY KEY (id)
);