DROP TABLE IF EXISTS `producttechdownloads`;
CREATE TABLE `producttechdownloads` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `productId` int(10) unsigned NOT NULL DEFAULT '0',
  `downloadsAssetId` varchar(32) NOT NULL DEFAULT '',
  `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`),
  KEY `active` (`active`),
  KEY `created` (`created`),
  KEY `createdById` (`createdById`),
  KEY `updated` (`updated`),
  KEY `updatedById` (`updatedById`),
  KEY `productId` (`productId`),
  KEY `downloadsAssetId` (`downloadsAssetId`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


ALTER TABLE `suppliercode` ADD COLUMN `preferred`  tinyint(1) NOT NULL DEFAULT 0 AFTER `canSupplyQty`;
CREATE INDEX `preferred` ON `suppliercode`(`preferred`) USING BTREE ;