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