DROP TABLE IF EXISTS `productbom`;
CREATE TABLE `productbom` (
  `id`  int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `productId`  int(10) UNSIGNED NOT NULL DEFAULT 0 ,
  `bomProductId`  int(10) UNSIGNED NOT NULL DEFAULT 0 ,
  `qty`  int(10) UNSIGNED NOT NULL DEFAULT 0 ,
  `percentage`  int(3) UNSIGNED NOT NULL DEFAULT 0 ,
  `itemDescription`  text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
  `active`  tinyint(1) NOT NULL DEFAULT 1 ,
  `created`  datetime NOT NULL DEFAULT '0001-01-01 00:00:00' ,
  `createdById`  int(10) UNSIGNED NOT NULL DEFAULT 0 ,
  `updated`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
  `updatedById`  int(10) UNSIGNED NOT NULL DEFAULT 0 ,
  PRIMARY KEY (`id`),
  INDEX `productId` (`productId`) USING BTREE ,
  INDEX `bomProductId` (`bomProductId`) USING BTREE ,
  INDEX `qty` (`qty`) USING BTREE ,
  INDEX `percentage` (`percentage`) USING BTREE
)
  ENGINE=InnoDB
  DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
  ROW_FORMAT=Dynamic
;
