ALTER TABLE `tblitems` ADD `markup` DOUBLE(15,2) NOT NULL AFTER `group_id`, ADD `markup_type` ENUM('percent','fixed') NOT NULL AFTER `markup`;

CREATE TABLE `tblitems_supplies` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `item_id` bigint(20) UNSIGNED NOT NULL,
  `cp_supply_id` bigint(20) UNSIGNED DEFAULT NULL,
  `my_supply_id` bigint(20) UNSIGNED DEFAULT NULL,
  `type` enum('my_supply','cp_supply') COLLATE utf8_unicode_ci DEFAULT NULL,
  `name` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
  `image` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_url` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL,
  `category_name` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL,
  `supplier_name` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL,
  `tag` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL,
  `price` decimal(15,2) DEFAULT 0.00,
  `quantity` bigint(20) UNSIGNED NOT NULL,
  `markup_percent` decimal(15,2) DEFAULT 0.00,
  `markup_total` decimal(15,2) DEFAULT 0.00,
  `supply_total_price` decimal(15,2) NOT NULL,
  `added_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

ALTER TABLE `tblitems_supplies`
  ADD PRIMARY KEY (`id`),
  ADD KEY `cp_supply_id` (`cp_supply_id`),
  ADD KEY `my_supply_id` (`my_supply_id`),
  ADD KEY `item_id` (`item_id`) USING BTREE;

ALTER TABLE `tblitems_supplies`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;  

ALTER TABLE `tblitems` CHANGE `markup` `markup` DOUBLE(15,2) NULL, CHANGE `markup_type` `markup_type` ENUM('percent','fixed') CHARACTER SET utf8 COLLATE utf8_general_ci NULL;

ALTER TABLE `tblitems_supplies` ADD `source_product_sku` VARCHAR(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER `name`, ADD `product_url` VARCHAR(800) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER `source_product_sku`, ADD `supplier_image` VARCHAR(191) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL AFTER `product_url`;

ALTER TABLE `tblitems_supplies` ADD `supplier_id` BIGINT(20) NULL AFTER `product_url`;

ALTER TABLE `tblitems_supplies` ADD `category_id` BIGINT(20) NULL AFTER `image_url`;
