summaryrefslogtreecommitdiff
path: root/updates/2.00-to-x.xx.sql
blob: 71e697b7a157a4e12ae541a71ae07ac6c1f727c8 (plain)
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# 19/04/2001:
ALTER TABLE node ADD comment int(2) DEFAULT '1' NOT NULL;

CREATE TABLE cvs (
  user varchar(32) DEFAULT '' NOT NULL,
  files text,
  status int(2) DEFAULT '0' NOT NULL,
  message text,
  timestamp int(11) DEFAULT '0' NOT NULL
);

# 14/04/2001:
ALTER TABLE node ADD cid int(10) unsigned DEFAULT '0' NOT NULL;
ALTER TABLE node ADD tid int(10) unsigned DEFAULT '0' NOT NULL;
ALTER TABLE story DROP section;
ALTER TABLE comments ADD KEY(lid);

CREATE TABLE category (
  cid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
  name varchar(32) DEFAULT '' NOT NULL,
  type varchar(16) DEFAULT '' NOT NULL,
  post int(3) DEFAULT '0' NOT NULL,
  dump int(3) DEFAULT '0' NOT NULL,
  expire int(3) DEFAULT '0' NOT NULL,
  comment int(2) unsigned DEFAULT '0' NOT NULL,
  submission int(2) unsigned DEFAULT '0' NOT NULL,
  UNIQUE (name),
  PRIMARY KEY (cid)
);

CREATE TABLE topic (
  tid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
  pid int(10) unsigned DEFAULT '0' NOT NULL,
  name varchar(32) DEFAULT '' NOT NULL,
  UNIQUE (name),
  PRIMARY KEY (tid)
);

# 07/04/2001:
CREATE TABLE page (
  lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
  nid int(10) unsigned DEFAULT '0' NOT NULL,
  body text NOT NULL,
  format tinyint(2) DEFAULT '0' NOT NULL,
  PRIMARY KEY (lid)
);

CREATE TABLE variable (
  name varchar(32) DEFAULT '' NOT NULL,
  value text DEFAULT '' NOT NULL,
  PRIMARY KEY (name)
);

CREATE TABLE rating (
  user int(6) DEFAULT '0' NOT NULL,
  new int(6) DEFAULT '0' NOT NULL,
  old int(6) DEFAULT '0' NOT NULL,
  PRIMARY KEY (user)
);

CREATE TABLE watchdog (
  id int(5) DEFAULT '0' NOT NULL auto_increment,
  user int(6) DEFAULT '0' NOT NULL,
  type varchar(16) DEFAULT '' NOT NULL,
  link varchar(16) DEFAULT '' NOT NULL,
  message varchar(255) DEFAULT '' NOT NULL,
  location varchar(128) DEFAULT '' NOT NULL,
  hostname varchar(128) DEFAULT '' NOT NULL,
  timestamp int(11) DEFAULT '0' NOT NULL,
  PRIMARY KEY (id)
);

ALTER TABLE users CHANGE rating rating decimal(8,2);

# 01/04/2001:

CREATE TABLE access (
  id tinyint(10) DEFAULT '0' NOT NULL auto_increment,
  mask varchar(255) DEFAULT '' NOT NULL,
  reason text NOT NULL,
  UNIQUE mask (mask),
  PRIMARY KEY (id)
);

CREATE TABLE book (
  lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
  nid int(10) unsigned DEFAULT '0' NOT NULL,
  body text NOT NULL,
  section int(10) DEFAULT '0' NOT NULL,
  parent int(10) DEFAULT '0' NOT NULL,
  weight tinyint(3) DEFAULT '0' NOT NULL,
  PRIMARY KEY (lid)
);

CREATE TABLE story (
  lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
  nid int(10) unsigned DEFAULT '0' NOT NULL,
  abstract text NOT NULL,
  body text NOT NULL,
  section varchar(64) DEFAULT '' NOT NULL,
  PRIMARY KEY (lid)
);

CREATE TABLE node (
  nid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
  lid int(10) DEFAULT '0' NOT NULL,
  pid int(10) DEFAULT '0' NOT NULL,
  log text NOT NULL,
  type varchar(16) DEFAULT '' NOT NULL,
  title varchar(128) DEFAULT '' NOT NULL,
  score int(11) DEFAULT '0' NOT NULL,
  votes int(11) DEFAULT '0' NOT NULL,
  author int(6) DEFAULT '0' NOT NULL,
  status int(4) DEFAULT '1' NOT NULL,
  timestamp int(11) NOT NULL,
  KEY type (lid, type),
  KEY author (author),
  KEY title (title, type),
  PRIMARY KEY (nid)
);

alter table users change stories nodes tinyint(2) DEFAULT '10';
alter table comments drop link;