Bug ID domain?
Jason Pyeron
jason at pyeron.com
Thu Apr 24 22:57:09 UTC 2003
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)
On Thu, 24 Apr 2003, Gervase Markham wrote:
>Well, currently they are auto-allocated by the database, starting at 1
>and going upwards, so it's codified like that. The domain is 1 -> 2^31
>at least.
I have seen several times where MySQL has started with zero [user
intervention maybe?]
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- -
- Jason Pyeron http://www.pyerotechnics.com -
- Owner & Lead Pyerotechnics Development, Inc. -
- +1 410 808 6646 (c) 500 West University Parkway #1S -
- +1 410 467 2266 (f) Baltimore, Maryland 21210-3253 -
- -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you
have received it in error, purge the message from your system and
notify the sender immediately. Any other use of the email by you
is prohibited.
More information about the developers
mailing list