summaryrefslogtreecommitdiffstats
path: root/docs/xml/dbschema.mysql
blob: c75c4caa421fe5542a20cfb42baa3743f53ece23 (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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# MySQL dump 7.1
#
# Host: localhost    Database: bugs
#--------------------------------------------------------
# Server version	3.22.32

#
# Table structure for table 'attachments'
#
CREATE TABLE attachments (
  attach_id mediumint(9) DEFAULT '0' NOT NULL auto_increment,
  bug_id mediumint(9) DEFAULT '0' NOT NULL,
  creation_ts timestamp(14),
  description mediumtext NOT NULL,
  mimetype mediumtext NOT NULL,
  ispatch tinyint(4),
  filename mediumtext NOT NULL,
  thedata longblob NOT NULL,
  submitter_id mediumint(9) DEFAULT '0' NOT NULL,
  PRIMARY KEY (attach_id)
);
create index index_41 on attachments (bug_id); 
create index index_42 on attachments (creation_ts);

#
# Table structure for table 'bugs'
#
CREATE TABLE bugs (
  bug_id mediumint(9) DEFAULT '0' NOT NULL auto_increment,
  groupset bigint(20) DEFAULT '0' NOT NULL,
  assigned_to mediumint(9) DEFAULT '0' NOT NULL,
  bug_file_loc text,
  bug_severity enum DEFAULT 'blocker' NOT NULL,
  bug_status enum DEFAULT 'UNCONFIRMED' NOT NULL,
  creation_ts datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
  delta_ts timestamp(14),
  short_desc mediumtext,
  op_sys enum DEFAULT 'All' NOT NULL,
  priority enum DEFAULT 'P1' NOT NULL,
  product varchar(64) DEFAULT '' NOT NULL,
  rep_platform enum,
  reporter mediumint(9) DEFAULT '0' NOT NULL,
  version varchar(16) DEFAULT '' NOT NULL,
  component varchar(50) DEFAULT '' NOT NULL,
  resolution enum DEFAULT '' NOT NULL,
  target_milestone varchar(20) DEFAULT '---' NOT NULL,
  qa_contact mediumint(9) DEFAULT '0' NOT NULL,
  status_whiteboard mediumtext NOT NULL,
  votes mediumint(9) DEFAULT '0' NOT NULL,
  keywords mediumtext NOT NULL,
  lastdiffed datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
  everconfirmed tinyint(4) DEFAULT '0' NOT NULL,
  PRIMARY KEY (bug_id)
);
create index index_7 on bugs (assigned_to);
create index index_8 on bugs (creation_ts);
create index index_9 on bugs (delta_ts);
create index index_10 on bugs (bug_severity);
create index index_11 on bugs (bug_status);
create index index_12 on bugs (op_sys);
create index index_13 on bugs (priority);
create index index_14 on bugs (product);
create index index_15 on bugs (reporter);
create index index_16 on bugs (version);
create index index_17 on bugs (component);
create index index_18 on bugs (resolution);
create index index_19 on bugs (target_milestone); 
create index index_20 on bugs (qa_contact);
create index index_21 on bugs (votes);

#
# Table structure for table 'bugs_activity'
#
CREATE TABLE bugs_activity (
  bug_id mediumint(9) DEFAULT '0' NOT NULL,
  who mediumint(9) DEFAULT '0' NOT NULL,
  bug_when datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
  fieldid mediumint(9) DEFAULT '0' NOT NULL,
  oldvalue tinytext,
  newvalue tinytext
);
create index index_43 on bugs_activity (bug_id); 
create index index_44 on bugs_activity (bug_when); 
create index index_45 on bugs_activity (fieldid);

#
# Table structure for table 'cc'
#
CREATE TABLE cc (
  bug_id mediumint(9) DEFAULT '0' NOT NULL,
  who mediumint(9) DEFAULT '0' NOT NULL
);
create index index_31 on cc (who);
create unique index index_32 on cc (bug_id,who);

#
# Table structure for table 'components'
#
CREATE TABLE components (
  value tinytext,
  program varchar(64),
  initialowner tinytext NOT NULL,
  initialqacontact tinytext NOT NULL,
  description mediumtext NOT NULL
);

#
# Table structure for table 'dependencies'
#
CREATE TABLE dependencies (
  blocked mediumint(9) DEFAULT '0' NOT NULL,
  dependson mediumint(9) DEFAULT '0' NOT NULL
);
create index index_34 on dependencies (blocked); 
create index index_35 on dependencies (dependson);

#
# Table structure for table 'duplicates'
#
CREATE TABLE duplicates (
  dupe_of mediumint(9) DEFAULT '0' NOT NULL,
  dupe mediumint(9) DEFAULT '0' NOT NULL,
  PRIMARY KEY (dupe)
);

#
# Table structure for table 'fielddefs'
#
CREATE TABLE fielddefs (
  fieldid mediumint(9) DEFAULT '0' NOT NULL auto_increment,
  name varchar(64) DEFAULT '' NOT NULL,
  description mediumtext NOT NULL,
  mailhead tinyint(4) DEFAULT '0' NOT NULL,
  sortkey smallint(6) DEFAULT '0' NOT NULL,
  PRIMARY KEY (fieldid)
);
create unique index index_28 on fielddefs (name); 
create index index_29 on fielddefs (sortkey);

#
# Table structure for table 'groups'
#
CREATE TABLE groups (
  bit bigint(20) DEFAULT '0' NOT NULL,
  name varchar(255) DEFAULT '' NOT NULL,
  description text NOT NULL,
  isbuggroup tinyint(4) DEFAULT '0' NOT NULL,
  userregexp tinytext NOT NULL
);
create unique index index_3 on groups (bit);
create unique index index_4 on groups (name);

#
# Table structure for table 'keyworddefs'
#
CREATE TABLE keyworddefs (
  id smallint(6) DEFAULT '0' NOT NULL,
  name varchar(64) DEFAULT '' NOT NULL,
  description mediumtext,
  PRIMARY KEY (id)
);
create unique index index_33 on keyworddefs (name);

#
# Table structure for table 'keywords'
#
CREATE TABLE keywords (
  bug_id mediumint(9) DEFAULT '0' NOT NULL,
  keywordid smallint(6) DEFAULT '0' NOT NULL
);
create index index_39 on keywords (keywordid); 
create unique index index_40 on keywords (bug_id, keywordid);

#
# Table structure for table 'logincookies'
#
CREATE TABLE logincookies (
  cookie mediumint(9) DEFAULT '0' NOT NULL auto_increment,
  userid mediumint(9) DEFAULT '0' NOT NULL,
  cryptpassword varchar(64),
  hostname varchar(128),
  lastused timestamp(14),
  PRIMARY KEY (cookie)
);
create index index_30 on logincookies (lastused);

#
# Table structure for table 'longdescs'
#
CREATE TABLE longdescs (
  bug_id mediumint(9) DEFAULT '0' NOT NULL,
  who mediumint(9) DEFAULT '0' NOT NULL,
  bug_when datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
  thetext mediumtext
);
create index index_22 on longdescs (bug_id);
create index index_23 on longdescs (bug_when);

#
# Table structure for table 'milestones'
#
CREATE TABLE milestones (
  value varchar(20) DEFAULT '' NOT NULL,
  product varchar(64) DEFAULT '' NOT NULL,
  sortkey smallint(6) DEFAULT '0' NOT NULL,
);
create unique index index_24 on milestones (product, value);

#
# Table structure for table 'namedqueries'
#
CREATE TABLE namedqueries (
  userid mediumint(9) DEFAULT '0' NOT NULL,
  name varchar(64) DEFAULT '' NOT NULL,
  watchfordiffs tinyint(4) DEFAULT '0' NOT NULL,
  linkinfooter tinyint(4) DEFAULT '0' NOT NULL,
  query mediumtext NOT NULL
);
create unique index index_25 on namedqueries (userid, name);
create index index_26 on namedqueries (watchfordiffs);

#
# Table structure for table 'products'
#
CREATE TABLE products (
  product varchar(64),
  description mediumtext,
  milestoneurl tinytext NOT NULL,
  disallownew tinyint(4) DEFAULT '0' NOT NULL,
  votesperuser smallint(6) DEFAULT '0' NOT NULL,
  maxvotesperbug smallint(6) DEFAULT '10000' NOT NULL,
  votestoconfirm smallint(6) DEFAULT '0' NOT NULL,
  defaultmilestone varchar(20) DEFAULT '---' NOT NULL
);

#
# Table structure for table 'profiles'
#
CREATE TABLE profiles (
  userid mediumint(9) DEFAULT '0' NOT NULL auto_increment,
  login_name varchar(255) DEFAULT '' NOT NULL,
  password varchar(16),
  cryptpassword varchar(64),
  realname varchar(255),
  groupset bigint(20) DEFAULT '0' NOT NULL,
  emailnotification enum DEFAULT 'ExcludeSelfChanges' NOT NULL,
  disabledtext mediumtext NOT NULL,
  newemailtech tinyint(4) DEFAULT '0' NOT NULL,
  mybugslink tinyint(4) DEFAULT '1' NOT NULL,
  blessgroupset bigint(20) DEFAULT '0' NOT NULL,
  PRIMARY KEY (userid)
);
create unique index index_27 on profiles (login_name);

#
# Table structure for table 'profiles_activity'
#
CREATE TABLE profiles_activity (
  userid mediumint(9) DEFAULT '0' NOT NULL,
  who mediumint(9) DEFAULT '0' NOT NULL,
  profiles_when datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
  fieldid mediumint(9) DEFAULT '0' NOT NULL,
  oldvalue tinytext,
  newvalue tinytext
);
create index index_0 on profiles_activity (userid); 
create index index_1 on profiles_activity (profiles_when); 
create index index_2 on profiles_activity (fieldid);

#
# Table structure for table 'shadowlog'
#
CREATE TABLE shadowlog (
  id int(11) DEFAULT '0' NOT NULL auto_increment,
  ts timestamp(14),
  reflected tinyint(4) DEFAULT '0' NOT NULL,
  command mediumtext NOT NULL,
  PRIMARY KEY (id)
);
create index index_38 on shadowlog (reflected);

#
# Table structure for table 'versions'
#
CREATE TABLE versions (
  value tinytext,
  program varchar(64) DEFAULT '' NOT NULL
);

#
# Table structure for table 'votes'
#
CREATE TABLE votes (
  who mediumint(9) DEFAULT '0' NOT NULL,
  bug_id mediumint(9) DEFAULT '0' NOT NULL,
  count smallint(6) DEFAULT '0' NOT NULL
);
create index index_5 on votes (who);
create index index_6 on votes (bug_id);

#
# Table structure for table 'watch'
#
CREATE TABLE watch (
  watcher mediumint(9) DEFAULT '0' NOT NULL,
  watched mediumint(9) DEFAULT '0' NOT NULL
);
create index index_36 on watch (watched);
create unique index index_37 on watch (watcher, watched);