Upgrade to 4.2.8
[usit-rt.git] / etc / upgrade / 3.9.8 / schema.Pg
CommitLineData
3ffc5f4f 1DROP TABLE IF EXISTS Classes;
01e3b242
MKG
2CREATE TABLE Classes (
3id SERIAL,
4Name varchar(255) NOT NULL DEFAULT '',
5Description varchar(255) NOT NULL DEFAULT '',
6SortOrder integer NOT NULL DEFAULT 0,
7Disabled smallint NOT NULL DEFAULT 0,
8Creator integer NOT NULL DEFAULT 0,
9Created TIMESTAMP NULL,
10LastUpdatedBy integer NOT NULL DEFAULT 0,
11LastUpdated TIMESTAMP NULL,
12HotList smallint NOT NULL DEFAULT 0,
13PRIMARY KEY (id)
14);
15
3ffc5f4f 16DROP TABLE IF EXISTS Articles;
01e3b242
MKG
17CREATE TABLE Articles (
18id SERIAL,
19Name varchar(255) NOT NULL DEFAULT '',
20Summary varchar(255) NOT NULL DEFAULT '',
21SortOrder integer NOT NULL DEFAULT 0,
22Class integer NOT NULL DEFAULT 0,
23Parent integer NOT NULL DEFAULT 0,
24URI varchar(255),
25Creator integer NOT NULL DEFAULT 0,
26Created TIMESTAMP NULL,
27LastUpdatedBy integer NOT NULL DEFAULT 0,
28LastUpdated TIMESTAMP NULL,
29PRIMARY KEY (id)
30);
31
32
3ffc5f4f 33DROP TABLE IF EXISTS Topics;
01e3b242
MKG
34CREATE TABLE Topics (
35id SERIAL,
36Parent integer NOT NULL DEFAULT 0,
37Name varchar(255) NOT NULL DEFAULT '',
38Description varchar(255) NOT NULL DEFAULT '',
39ObjectType varchar(64) NOT NULL DEFAULT '',
40ObjectId integer NOT NULL,
41PRIMARY KEY (id)
42);
43
44
3ffc5f4f 45DROP TABLE IF EXISTS ObjectTopics;
01e3b242
MKG
46CREATE TABLE ObjectTopics (
47id SERIAL,
48Topic integer NOT NULL,
49ObjectType varchar(64) NOT NULL DEFAULT '',
50ObjectId integer NOT NULL,
51PRIMARY KEY (id)
52);
53
54
3ffc5f4f 55DROP TABLE IF EXISTS ObjectClasses;
01e3b242
MKG
56CREATE TABLE ObjectClasses (
57id SERIAL,
58Class integer NOT NULL,
59ObjectType varchar(255) NOT NULL DEFAULT '',
60ObjectId integer NOT NULL,
61Creator integer NOT NULL DEFAULT 0,
62Created TIMESTAMP NULL,
63LastUpdatedBy integer NOT NULL DEFAULT 0,
64LastUpdated TIMESTAMP NULL,
65PRIMARY KEY (id)
66);
67