Bug ID domain?

Sean McAfee etzwane at schwag.org
Thu Apr 24 23:31:35 UTC 2003


Jason Pyeron <jason at pyeron.com> wrote:
>On Thu, 24 Apr 2003, Sean McAfee wrote:
>>I ask because I've just realized I haven't yet allowed for storage of 
>>field default values in my custom fields schema.  For a table like this:
>>
>>cf_integer
>>----------
>>bug_id integer not null,
>>field_id integer not null,
>>value integer,
>>primary key (bug_id, field_id)
>>
>>...I'd like to use a special bug_id to store the default value for a 
>>given field_id.  NULL is out, unfortunately, because I need that primary key.
>>Would using a number like 0 or -1 be safe?

>Why would you need to store defaults this way? That appears to be a DATA 
>table. And hacks are bad.
>
>IMHO:
>cf_integer_metadata
>-------------------
>field_id int not null,
>defval int,
>columndesc varchar(63),
>primary key (filed_id)

Sure, that'd be the most straightforward way to handle the issue.
However, the tables I've already proposed have swollen the number of
tables in the Bugzilla schema by almost 50%.  I'd be happier if those
existing tables could be leveraged to hold default data as well, rather
than introduce five new ones.  (I admit that this is more of an aesthetic
thing for me.)


-- 
Sean McAfee -- etzwane at schwag.org



More information about the developers mailing list