RSS

(root)/bugzilla/3.6 : 6113 (compared to revision 7122) : UPGRADING-pre-2.8

To get this branch, use:
bzr branch /bugzilla/3.6

« back to all changes in this revision

Viewing changes to UPGRADING-pre-2.8

mkanat%bugzilla.org
2008-06-29 19:57:54
Revision ID: cvs-1:mkanatbugzilla.org-20080630025754-h0rylmikmb6z28g1
Bug 440612 â€“ Use Bugzilla::Bug->check everywhere instead of ValidateBugID
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit

Show diffs side-by-side

added added

removed removed

 
1
This file contains only important changes made to Bugzilla before release
 
2
2.8.  If you are upgrading from version older than 2.8, please read this file.
 
3
If you are upgrading from 2.8 or newer, please read the Installation and
 
4
Upgrade instructions in The Bugzilla Guide, found with this distribution in
 
5
docs/html, docs/txt, and docs/sgml.
 
6
 
 
7
Please note that the period in our version numbers is a place separator, not
 
8
a decimal point.  The 14 in version 2.14 is newer than the 8 in 2.8, for
 
9
example.  You should only be using this file if you have a single digit
 
10
after the period in the version 2.x Bugzilla you are upgrading from.
 
11
 
 
12
For a complete list of what changes, use Bonsai
 
13
(http://cvs-mirror.mozilla.org/webtools/bonsai/cvsqueryform.cgi) to
 
14
query the CVS tree.  For example,
 
15
 
 
16
    http://cvs-mirror.mozilla.org/webtools/bonsai/cvsquery.cgi?module=all&branch=HEAD&branchtype=match&dir=mozilla%2Fwebtools%2Fbugzilla&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=week&mindate=&maxdate=&cvsroot=%2Fcvsroot 
 
17
 
 
18
will tell you what has been changed in the last week.
 
19
 
 
20
 
 
21
10/12/99 The CHANGES file is now obsolete!  There is a new file called
 
22
checksetup.pl.  You should get in the habit of running that file every time
 
23
you update your installation of Bugzilla.  That file will be constantly 
 
24
updated to automatically update your installation to match any code changes.
 
25
If you're curious as to what is going on, changes are commented in that file, 
 
26
at the end.
 
27
 
 
28
Many thanks to Holger Schurig <holgerschurig@nikocity.de> for writing this
 
29
script!
 
30
 
 
31
 
 
32
 
 
33
10/11/99 Restructured voting database to add a cached value in each
 
34
bug recording how many total votes that bug has.  While I'm at it, I
 
35
removed the unused "area" field from the bugs database.  It is
 
36
distressing to realize that the bugs table has reached the maximum
 
37
number of indices allowed by MySQL (16), which may make future
 
38
enhancements awkward.
 
39
 
 
40
You must feed the following to MySQL:
 
41
 
 
42
        alter table bugs drop column area;
 
43
        alter table bugs add column votes mediumint not null, add index (votes);
 
44
 
 
45
You then *must* delete the data/versioncache file when you make this
 
46
change, as it contains references to the "area" field.  Deleting it is safe,
 
47
bugzilla will correctly regenerate it.
 
48
 
 
49
If you have been using the voting feature at all, then you will then
 
50
need to update the voting cache.  You can do this by visiting the
 
51
sanitycheck.cgi page, and taking it up on its offer to rebuild the
 
52
votes stuff.
 
53
 
 
54
 
 
55
10/7/99 Added voting ability.  You must run the new script
 
56
"makevotestable.sh".  You must also feed the following to mysql:
 
57
 
 
58
        alter table products add column votesperuser smallint not null;
 
59
 
 
60
 
 
61
 
 
62
9/15/99 Apparently, newer alphas of MySQL won't allow you to have
 
63
"when" as a column name.  So, I have had to rename a column in the
 
64
bugs_activity table.  You must feed the below to mysql or you won't
 
65
work at all.
 
66
 
 
67
        alter table bugs_activity change column when bug_when datetime not null;
 
68
 
 
69
 
 
70
8/16/99 Added "OpenVMS" to the list of OS's. Feed this to mysql:
 
71
 
 
72
        alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.6.1", "Mac System 8.0", "Mac System 8.5", "Mac System 8.6", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "FreeBSD", "OSF/1", "Solaris", "SunOS", "Neutrino", "OS/2", "BeOS", "OpenVMS", "other") not null;
 
73
 
 
74
6/22/99 Added an entry to the attachments table to record who the submitter
 
75
was.  Nothing uses this yet, but it still should be recorded.
 
76
 
 
77
        alter table attachments add column submitter_id mediumint not null;
 
78
 
 
79
You should also run this script to populate the new field:
 
80
 
 
81
#!/usr/bin/perl -w
 
82
use diagnostics;
 
83
use strict;
 
84
require "globals.pl";
 
85
$|=1;
 
86
ConnectToDatabase();
 
87
SendSQL("select bug_id, attach_id from attachments order by bug_id");
 
88
my @list;
 
89
while (MoreSQLData()) {
 
90
    my @row = FetchSQLData();
 
91
    push(@list, \@row);
 
92
}
 
93
foreach my $ref (@list) {
 
94
    my ($bug, $attach) = (@$ref);
 
95
    SendSQL("select long_desc from bugs where bug_id = $bug");
 
96
    my $comment = FetchOneColumn() . "Created an attachment (id=$attach)";
 
97
 
 
98
    if ($comment =~ m@-* Additional Comments From ([^ ]*)[- 0-9/:]*\nCreated an attachment \(id=$attach\)@) {
 
99
        print "Found $1\n";
 
100
        SendSQL("select userid from profiles where login_name=" .
 
101
                SqlQuote($1));
 
102
        my $userid = FetchOneColumn();
 
103
        if (defined $userid && $userid > 0) {
 
104
            SendSQL("update attachments set submitter_id=$userid where attach_id = $attach");
 
105
        }
 
106
    } else {
 
107
        print "Bug $bug can't find comment for attachment $attach\n";
 
108
    }
 
109
}
 
110
 
 
111
 
 
112
 
 
113
 
 
114
 
 
115
 
 
116
6/14/99 Added "BeOS" to the list of OS's. Feed this to mysql:
 
117
 
 
118
        alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.6.1", "Mac System 8.0", "Mac System 8.5", "Mac System 8.6", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "FreeBSD", "OSF/1", "Solaris", "SunOS", "Neutrino", "OS/2", "BeOS", "other") not null;
 
119
 
 
120
 
 
121
5/27/99 Added support for dependency information.  You must run the new
 
122
"makedependenciestable.sh" script.  You can turn off dependencies with the new
 
123
"usedependencies" param, but it defaults to being on.  Also, read very
 
124
carefully the description for the new "webdotbase" param; you will almost
 
125
certainly need to tweak it.
 
126
 
 
127
 
 
128
5/24/99 Added "Mac System 8.6" and "Neutrino" to the list of OS's.
 
129
Feed this to mysql:
 
130
 
 
131
        alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.6.1", "Mac System 8.0", "Mac System 8.5", "Mac System 8.6", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "FreeBSD", "OSF/1", "Solaris", "SunOS", "Neutrino", "OS/2", "other") not null;
 
132
 
 
133
 
 
134
5/12/99 Added a pref to control how much email you get.  This needs a new
 
135
column in the profiles table, so feed the following to mysql:
 
136
 
 
137
        alter table profiles add column emailnotification enum("ExcludeSelfChanges", "CConly", "All") not null default "ExcludeSelfChanges";
 
138
 
 
139
5/5/99 Added the ability to search by creation date.  To make this perform
 
140
well, you ought to do the following:
 
141
 
 
142
        alter table bugs change column creation_ts creation_ts datetime not null, add index (creation_ts);
 
143
 
 
144
 
 
145
4/30/99 Added a new severity, "blocker".  To get this into your running
 
146
Bugzilla, do the following:
 
147
 
 
148
        alter table bugs change column bug_severity bug_severity enum("blocker", "critical", "major", "normal", "minor", "trivial", "enhancement") not null;
 
149
 
 
150
 
 
151
4/22/99 There was a bug where the long descriptions of bugs had a variety of
 
152
newline characters at the end, depending on the operating system of the browser
 
153
that submitted the text.  This bug has been fixed, so that no further changes
 
154
like that will happen.  But to fix problems that have already crept into your
 
155
database, you can run the following perl script (which is slow and ugly, but
 
156
does work:)
 
157
#!/usr/bin/perl -w
 
158
use diagnostics;
 
159
use strict;
 
160
require "globals.pl";
 
161
$|=1;
 
162
ConnectToDatabase();
 
163
SendSQL("select bug_id from bugs order by bug_id");
 
164
my @list;
 
165
while (MoreSQLData()) {
 
166
    push(@list, FetchOneColumn());
 
167
}
 
168
foreach my $id (@list) {
 
169
    if ($id % 50 == 0) {
 
170
        print "\n$id ";
 
171
    }
 
172
    SendSQL("select long_desc from bugs where bug_id = $id");
 
173
    my $comment = FetchOneColumn();
 
174
    my $orig = $comment;
 
175
    $comment =~ s/\r\n/\n/g;     # Get rid of windows-style line endings.
 
176
    $comment =~ s/\r/\n/g;       # Get rid of mac-style line endings.
 
177
    if ($comment ne $orig) {
 
178
        SendSQL("update bugs set long_desc = " . SqlQuote($comment) .
 
179
                " where bug_id = $id");
 
180
        print ".";
 
181
    } else {
 
182
        print "-";
 
183
    }
 
184
}
 
185
 
 
186
 
 
187
 
 
188
4/8/99 Added ability to store patches with bugs.  This requires a new table
 
189
to store the data, so you will need to run the "makeattachmenttable.sh" script.
 
190
 
 
191
3/25/99 Unfortunately, the HTML::FromText CPAN module had too many bugs, and
 
192
so I had to roll my own.  We no longer use the HTML::FromText CPAN module.
 
193
 
 
194
3/24/99 (This entry has been removed.  It used to say that we required the
 
195
HTML::FromText CPAN module, but that's no longer true.)
 
196
 
 
197
3/22/99 Added the ability to query by fields which have changed within a date
 
198
range.  To make this perform a bit better, we need a new index:
 
199
 
 
200
        alter table bugs_activity add index (field);
 
201
 
 
202
3/10/99 Added 'groups' stuff, where we have different group bits that we can
 
203
put on a person or on a bug.  Some of the group bits control access to bugzilla
 
204
features.  And a person can't access a bug unless he has every group bit set
 
205
that is also set on the bug.  See the comments in makegroupstable.sh for a bit
 
206
more info.
 
207
 
 
208
The 'maintainer' param is now used only as an email address for people to send
 
209
complaints to.  The groups table is what is now used to determine permissions.
 
210
 
 
211
You will need to run the new script "makegroupstable.sh".  And then you need to
 
212
feed the following lines to MySQL (replace XXX with the login name of the
 
213
maintainer, the person you wish to be all-powerful).
 
214
 
 
215
        alter table bugs add column groupset bigint not null;
 
216
        alter table profiles add column groupset bigint not null;
 
217
        update profiles set groupset=0x7fffffffffffffff where login_name = XXX;
 
218
 
 
219
 
 
220
 
 
221
3/8/99 Added params to control how priorities are set in a new bug.  You can
 
222
now choose whether to let submitters of new bugs choose a priority, or whether
 
223
they should just accept the default priority (which is now no longer hardcoded
 
224
to "P2", but is instead a param.)  The default value of the params will cause
 
225
the same behavior as before.
 
226
 
 
227
3/3/99 Added a "disallownew" field to the products table.  If non-zero, then
 
228
don't let people file new bugs against this product.  (This is for when a 
 
229
product is retired, but you want to keep the bug reports around for posterity.)
 
230
Feed this to MySQL:
 
231
 
 
232
        alter table products add column disallownew tinyint not null;
 
233
 
 
234
 
 
235
2/8/99 Added FreeBSD to the list of OS's.  Feed this to MySQL:
 
236
 
 
237
        alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.6.1", "Mac System 8.0", "Mac System 8.5", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "FreeBSD", "OSF/1", "Solaris", "SunOS", "OS/2", "other") not null;
 
238
 
 
239
 
 
240
2/4/99 Added a new column "description" to the components table, and added 
 
241
links to a new page which will use this to describe the components of a 
 
242
given product.  Feed this to MySQL:
 
243
 
 
244
        alter table components add column description mediumtext not null;
 
245
 
 
246
 
 
247
2/3/99 Added a new column "initialqacontact" to the components table that gives
 
248
an initial QA contact field.  It may be empty if you wish the initial qa
 
249
contact to be empty.  If you're not using the QA contact field, you don't need
 
250
to add this column, but you might as well be safe and add it anyway:
 
251
 
 
252
        alter table components add column initialqacontact tinytext not null;
 
253
 
 
254
 
 
255
2/2/99 Added a new column "milestoneurl" to the products table that gives a URL
 
256
which is to describe the currently defined milestones for a product.  If you
 
257
don't use target milestone, you might be able to get away without adding this
 
258
column, but you might as well be safe and add it anyway:
 
259
 
 
260
        alter table products add column milestoneurl tinytext not null;
 
261
 
 
262
 
 
263
1/29/99 Whoops; had a misspelled op_sys.  It was "Mac System 7.1.6"; it should
 
264
be "Mac System 7.6.1".  It turns out I had no bugs with this value set, so I
 
265
could just do the below simple command.  If you have bugs with this value, you
 
266
may need to do something more complicated.
 
267
 
 
268
        alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.6.1", "Mac System 8.0", "Mac System 8.5", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "OSF/1", "Solaris", "SunOS", "OS/2", "other") not null;
 
269
 
 
270
 
 
271
 
 
272
1/20/99 Added new fields: Target Milestone, QA Contact, and Status Whiteboard.
 
273
These fields are all optional in the UI; there are parameters to turn them on.
 
274
However, whether or not you use them, the fields need to be in the DB.  There
 
275
is some code that needs them, even if you don't.
 
276
 
 
277
To update your DB to have these fields, send the following to MySQL:
 
278
 
 
279
        alter table bugs add column target_milestone varchar(20) not null,
 
280
                add column qa_contact mediumint not null,
 
281
                add column status_whiteboard mediumtext not null,
 
282
                add index (target_milestone), add index (qa_contact);
 
283
 
 
284
 
 
285
 
 
286
1/18/99 You can now query by CC.  To make this perform reasonably, the CC table
 
287
needs some indices.  The following MySQL does the necessary stuff:
 
288
 
 
289
        alter table cc add index (bug_id), add index (who);
 
290
 
 
291
 
 
292
1/15/99 The op_sys field can now be queried by (and more easily tweaked).
 
293
To make this perform reasonably, it needs an index.  The following MySQL 
 
294
command will create the necessary index:
 
295
 
 
296
        alter table bugs add index (op_sys);
 
297
 
 
298
 
 
299
12/2/98 The op_sys and rep_platform fields have been tweaked.  op_sys
 
300
is now an enum, rather than having the legal values all hard-coded in
 
301
perl.  rep_platform now no longer allows a value of "X-Windows".
 
302
 
 
303
Here's how I ported to the new world.  This ought to work for you too.
 
304
Actually, it's probably overkill.  I had a lot of illegal values for op_sys
 
305
in my tables, from importing bugs from strange places.  If you haven't done 
 
306
anything funky, then much of the below will be a no-op.
 
307
 
 
308
First, send the following commands to MySQL to make sure all your values for
 
309
rep_platform and op_sys are legal in the new world..
 
310
 
 
311
        update bugs set rep_platform="Sun" where rep_platform="X-Windows" and op_sys like "Solaris%";
 
312
        update bugs set rep_platform="SGI" where rep_platform="X-Windows" and op_sys = "IRIX";
 
313
        update bugs set rep_platform="SGI" where rep_platform="X-Windows" and op_sys = "HP-UX";
 
314
        update bugs set rep_platform="DEC" where rep_platform="X-Windows" and op_sys = "OSF/1";
 
315
        update bugs set rep_platform="PC" where rep_platform="X-Windows" and op_sys = "Linux";
 
316
        update bugs set rep_platform="other" where rep_platform="X-Windows";
 
317
        update bugs set rep_platform="other" where rep_platform="";
 
318
        update bugs set op_sys="Mac System 7" where op_sys="System 7";
 
319
        update bugs set op_sys="Mac System 7.5" where op_sys="System 7.5";
 
320
        update bugs set op_sys="Mac System 8.0" where op_sys="8.0";
 
321
        update bugs set op_sys="OSF/1" where op_sys="Digital Unix 4.0";
 
322
        update bugs set op_sys="IRIX" where op_sys like "IRIX %";
 
323
        update bugs set op_sys="HP-UX" where op_sys like "HP-UX %";
 
324
        update bugs set op_sys="Windows NT" where op_sys like "NT %";
 
325
        update bugs set op_sys="OSF/1" where op_sys like "OSF/1 %";
 
326
        update bugs set op_sys="Solaris" where op_sys like "Solaris %";
 
327
        update bugs set op_sys="SunOS" where op_sys like "SunOS%";
 
328
        update bugs set op_sys="other" where op_sys = "Motif";
 
329
        update bugs set op_sys="other" where op_sys = "Other";
 
330
 
 
331
Next, send the following commands to make sure you now have only legal
 
332
entries in your table.  If either of the queries do not come up empty, then
 
333
you have to do more stuff like the above.
 
334
 
 
335
        select bug_id,op_sys,rep_platform from bugs where rep_platform not regexp "^(All|DEC|HP|Macintosh|PC|SGI|Sun|X-Windows|Other)$";
 
336
        select bug_id,op_sys,rep_platform from bugs where op_sys not regexp "^(All|Windows 3.1|Windows 95|Windows 98|Windows NT|Mac System 7|Mac System 7.5|Mac System 7.1.6|Mac System 8.0|AIX|BSDI|HP-UX|IRIX|Linux|OSF/1|Solaris|SunOS|other)$";
 
337
 
 
338
Finally, once that's all clear, alter the table to make enforce the new legal
 
339
entries:
 
340
 
 
341
        alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.1.6", "Mac System 8.0", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "OSF/1", "Solaris", "SunOS", "other") not null, change column rep_platform rep_platform enum("All", "DEC", "HP", "Macintosh", "PC", "SGI", "Sun", "Other");
 
342
 
 
343
 
 
344
 
 
345
 
 
346
 
 
347
11/20/98 Added searching of CC field.  To better support this, added
 
348
some indexes to the CC table.  You probably want to execute the following
 
349
mysql commands:
 
350
 
 
351
        alter table cc add index (bug_id);
 
352
        alter table cc add index (who);
 
353
 
 
354
 
 
355
10/27/98 security check for legal products in place. bug charts are not
 
356
available as an option if collectstats.pl has never been run. all products 
 
357
get daily stats collected now. README updated: Chart::Base is listed as
 
358
a requirement, instructions for using collectstats.pl included as 
 
359
an optional step. also got silly and added optional quips to bug
 
360
reports. 
 
361
 
 
362
10/17/98 modified README installation instructions slightly. 
 
363
 
 
364
10/7/98 Added a new table called "products".  Right now, this is used
 
365
only to have a description for each product, and that description is
 
366
only used when initially adding a new bug.  Anyway, you *must* create
 
367
the new table (which you can do by running the new makeproducttable.sh
 
368
script).  If you just leave it empty, things will work much as they
 
369
did before, or you can add descriptions for some or all of your
 
370
products.
 
371
 
 
372
 
 
373
9/15/98 Everything has been ported to Perl.  NO MORE TCL.  This
 
374
transition should be relatively painless, except for the "params"
 
375
file.  This is the file that contains parameters you've set up on the
 
376
editparams.cgi page.  Before changing to Perl, this was a tcl-syntax
 
377
file, stored in the same directory as the code; after the change to
 
378
Perl, it becomes a perl-syntax file, stored in a subdirectory named
 
379
"data".  See the README file for more details on what version of Perl
 
380
you need.
 
381
 
 
382
So, if updating from an older version of Bugzilla, you will need to
 
383
edit data/param, change the email address listed for
 
384
$::param{'maintainer'}, and then go revisit the editparams.cgi page
 
385
and reset all the parameters to your taste.  Fortunately, your old
 
386
params file will still be around, and so you ought to be able to
 
387
cut&paste important bits from there.
 
388
 
 
389
Also, note that the "whineatnews" script has changed name (it now has
 
390
an extension of .pl instead of .tcl), so you'll need to change your
 
391
cron job.
 
392
 
 
393
And the "comments" file has been moved to the data directory.  Just do
 
394
"cat comments >> data/comments" to restore any old comments that may
 
395
have been lost.
 
396
 
 
397
 
 
398
 
 
399
9/2/98 Changed the way password validation works.  We now keep a
 
400
crypt'd version of the password in the database, and check against
 
401
that.  (This is silly, because we're also keeping the plaintext
 
402
version there, but I have plans...)  Stop passing the plaintext
 
403
password around as a cookie; instead, we have a cookie that references
 
404
a record in a new database table, logincookies.
 
405
 
 
406
IMPORTANT: if updating from an older version of Bugzilla, you must run
 
407
the following commands to keep things working:
 
408
 
 
409
 ./makelogincookiestable.sh
 
410
 echo "alter table profiles add column cryptpassword varchar(64);" | mysql bugs
 
411
 echo "update profiles set cryptpassword = encrypt(password,substring(rand(),3, 4));" | mysql bugs
 
412
 

Loggerhead 1.18.1 is a web-based interface for Bazaar branches