Bugzilla/Components.pm

Kevin Benton kevin.benton at amd.com
Thu Jan 11 16:13:56 UTC 2007


Max Kanat-Alexander wrote:
> On Wed, 10 Jan 2007 14:39:29 -0700 "Kevin Benton"
> <kevin.benton at amd.com> wrote:
>   
>> I'm wondering, why do we define the elements of the component table 
>> twice?  Why not just use the definition from Bugzilla/DB/Schema.pm ?
>>     
>
>     Look at DB_COLUMNS in every single Bugzilla::Object derivative, and
> see if they all match up with the exact schema. Bugzilla::Bug is a
> great example.
>
> 	But it might be good to have a default for DB_COLUMNS that
> reads from bz_schema if it's not specified.
>
> 	-Max
>   
If nothing else, when a derivative is not required, only specifying 
schema items once (presumably in Schema.pm) certainly makes updating the 
schema and interactions easier. :)  I suggest we work toward removing 
duplicate definitions like the example I gave originally for code 
maintainability purposes. :)  If nothing else, it seems that we ought to 
at least ask Schema.pm for the type definition as opposed to re-coding 
it again in another area - again for maintainability reasons.

I also wonder if moving the database upgrade section of checksetup.pl 
into Schema.pm also makes sense so it's all in one place, possibly to 
Schema::check_and_upgrade_db().  Again, I say this because I'm thinking 
about maintainability - if all the core Schema changes are limited to 
Schema.pm, I believe that it should make it easier for maintainers to 
keep the number of files they touch down when making changes to the 
schema itself.

Back to my version per component work... :)

Kevin

-- 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bugzilla.org/pipermail/developers/attachments/20070111/02858faf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AMDLogo.png
Type: image/png
Size: 1784 bytes
Desc: not available
URL: <http://lists.bugzilla.org/pipermail/developers/attachments/20070111/02858faf/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kevin.benton.vcf
Type: text/x-vcard
Size: 892 bytes
Desc: not available
URL: <http://lists.bugzilla.org/pipermail/developers/attachments/20070111/02858faf/attachment.vcf>


More information about the developers mailing list