Bugzilla/Components.pm

Kevin Benton kevin.benton at amd.com
Wed Jan 10 21:39:29 UTC 2007


I am confused: I noticed that the following code is in 
Bugzilla/Components.pm

use constant DB_COLUMNS => qw(
    id
    name
    product_id
    initialowner
    initialqacontact
    description
);

I also found the definition of the Components table is in 
Bugzilla/DB/Schema.pm:

    components => {
        FIELDS => [
            id               => {TYPE => 'SMALLSERIAL', NOTNULL => 1,
                                 PRIMARYKEY => 1},
            name             => {TYPE => 'varchar(64)', NOTNULL => 1},
            product_id       => {TYPE => 'INT2', NOTNULL => 1},
            initialowner     => {TYPE => 'INT3', NOTNULL => 1},
            initialqacontact => {TYPE => 'INT3'},
            description      => {TYPE => 'MEDIUMTEXT', NOTNULL => 1},
        ],
        INDEXES => [
            components_product_id_idx => {FIELDS => [qw(product_id name)],
                                          TYPE => 'UNIQUE'},
            components_name_idx   => ['name'],
        ],
    },

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 ?

Kevin

-- 
-------------- 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/20070110/86c3998b/attachment.vcf>


More information about the developers mailing list