v41.sql 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. ALTER TABLE `products` CHANGE `shipping_cost` `shipping_cost` TEXT NULL DEFAULT NULL;
  2. ALTER TABLE `products` ADD `cash_on_delivery` TINYINT(1) NOT NULL DEFAULT '1' COMMENT '1 = On, 0 = Off' AFTER `published`;
  3. ALTER TABLE `products` ADD `low_stock_quantity` INT(11) NULL AFTER `min_qty`;
  4. ALTER TABLE `products` ADD `est_shipping_days` INT(11) NULL AFTER `shipping_cost`;
  5. ALTER TABLE `products` ADD `stock_visibility_state` VARCHAR(10) NOT NULL DEFAULT 'quantity' AFTER `published`;
  6. --
  7. -- Table structure for table `product_taxes`
  8. --
  9. CREATE TABLE `product_taxes` (
  10. `id` int(11) NOT NULL,
  11. `product_id` int(11) NOT NULL,
  12. `tax_id` int(11) NOT NULL,
  13. `tax` double(20,2) NOT NULL,
  14. `tax_type` varchar(10) NOT NULL,
  15. `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  16. `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
  17. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  18. --
  19. -- Indexes for table `product_taxes`
  20. --
  21. ALTER TABLE `product_taxes` ADD PRIMARY KEY (`id`);
  22. --
  23. -- AUTO_INCREMENT for table `product_taxes`
  24. --
  25. ALTER TABLE `product_taxes`
  26. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  27. --
  28. -- Table structure for table `taxes`
  29. --
  30. CREATE TABLE `taxes` (
  31. `id` int(11) NOT NULL,
  32. `name` varchar(255) NOT NULL,
  33. `tax_status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0 = Inactive, 1 = Active',
  34. `created_at` timestamp NULL DEFAULT current_timestamp(),
  35. `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
  36. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  37. --
  38. -- Indexes for table `taxes`
  39. --
  40. ALTER TABLE `taxes` ADD PRIMARY KEY (`id`);
  41. --
  42. -- AUTO_INCREMENT for table `taxes`
  43. --
  44. ALTER TABLE `taxes`
  45. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  46. INSERT INTO `taxes` (`id`, `name`, `tax_status`, `created_at`, `updated_at`) VALUES (NULL, 'Tax', '1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
  47. --
  48. -- Table structure for table `commission_histories`
  49. --
  50. CREATE TABLE `commission_histories` (
  51. `id` int(11) NOT NULL,
  52. `order_id` int(11) NOT NULL,
  53. `order_detail_id` int(11) NOT NULL,
  54. `seller_id` int(11) NOT NULL,
  55. `admin_commission` double(25,2) NOT NULL,
  56. `seller_earning` double(25,2) NOT NULL,
  57. `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  58. `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
  59. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  60. --
  61. -- Indexes for table `commission_histories`
  62. --
  63. ALTER TABLE `commission_histories`
  64. ADD PRIMARY KEY (`id`);
  65. --
  66. -- AUTO_INCREMENT for dumped tables
  67. --
  68. --
  69. -- AUTO_INCREMENT for table `commission_histories`
  70. --
  71. ALTER TABLE `commission_histories`
  72. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  73. UPDATE `business_settings` SET `value` = '4.1' WHERE `business_settings`.`type` = 'current_version';
  74. COMMIT;