Adding an operation system to the op_sys list (2.19)

David Miller justdave at bugzilla.org
Wed May 4 23:32:28 UTC 2005


Max Kanat-Alexander wrote:
> On Wed, 2005-05-04 at 14:49 -0500, Dave Williss wrote:
> 
>>In Bugzilla 2.19, the op_sys field in the bugs table is an enum.
>>How do I add an opsys? I need to add "Mac OS X 10.4".
>>There's no CGI way that I can see to do it.  Presumably, if
>>I knew the SQL syntax for it, I could change it, but I've never
>>used enums myself.
> 
> 	You can change localconfig. Watch out though... I've heard reports from
> people of their enums being eaten when they change them.

If you're adding one you're safe.  It's removing and renaming that cause 
weird problems if you aren't careful.

Change the list in localconfig, then run checksetup.pl to apply it to 
the database.

There really is no such thing as renaming one with the enum system. 
You're deleting it and re-adding with a different name.  So if you want 
to rename one, you have to add the new name first, then run 
checksetup.pl, then either run an SQL query or a mass change from the 
query page to change all of the old name to the new one, then go back 
and remove the old one from localconfig and run checksetup.pl again to 
remove it from the DB.

The main hangup here is if you remove one that's actually in use, it'll 
change that field to NULL in all the bugs that use it, which will trip 
up Bugzilla.

-- 
Dave Miller                                   http://www.justdave.net/
System Administrator, Mozilla Foundation       http://www.mozilla.org/
Project Leader, Bugzilla Bug Tracking System  http://www.bugzilla.org/



More information about the developers mailing list