
#
# Table that defines custom fields
#
create table customfields (
  id mediumint(9) default '0' not null auto_increment,
  name varchar(64) default '' not null,
  type enum('any', 'single', 'multi'),
  valexp mediumtext,
  KEY id (id)
)

#
# Product to CustomField join
#
create table products_customfields (
  product varchar(64) default '' not null,
  cf_id mediumint(9) default '0' not null
)

#
# Bug to CustomField join
#
create table bugs_customfields (
  bug_id mediumint(9) default '0' not null,
  cf_id mediumint(9) default '0' not null,
  value mediumtext
)
