CREATE TABLE eq_bcmBc (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `rid` int(10) unsigned DEFAULT NULL,
  `barcode` varchar(50) NOT NULL DEFAULT '',
  `status` varchar(25) NOT NULL DEFAULT 'available',
  `pending` int(10) DEFAULT '-1',
  `pendingFor` varchar(25) DEFAULT '',
  `sessionid` varchar(40) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `rid_bc` (`rid`,`barcode`),
  KEY `barcode` (`barcode`),
  KEY `status` (`status`(1)),
  KEY `index_1` (`sessionid`,`pending`,`pendingFor`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE eq_bcmRange (
  `rid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `vid` int(10) unsigned DEFAULT NULL,
  `bcLen` tinyint(4) DEFAULT NULL,
  `preFix` varchar(10) DEFAULT NULL,
  `rangeFr` int(10) unsigned DEFAULT NULL,
  `rangeTo` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`rid`),
  UNIQUE KEY `range` (`vid`,`preFix`,`bcLen`,`rangeFr`,`rangeTo`),
  KEY `vid` (`vid`),
  KEY `preFix` (`preFix`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE eq_bcmVendor (
  `vid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `vendor` varchar(40) NOT NULL DEFAULT 'Local',
  PRIMARY KEY (`vid`),
  UNIQUE KEY `vendor` (`vendor`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


