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