v43.sql 1.0 KB

1234567891011121314151617181920212223242526272829
  1. DROP TABLE `carts`;
  2. CREATE TABLE `carts` (
  3. `id` int(11) UNSIGNED NOT NULL,
  4. `owner_id` int(11) DEFAULT NULL,
  5. `user_id` int(11) DEFAULT NULL,
  6. `address_id` int(11) NOT NULL DEFAULT '0',
  7. `product_id` int(11) DEFAULT NULL,
  8. `variation` text COLLATE utf8_unicode_ci,
  9. `price` double(8,2) DEFAULT '0.00',
  10. `tax` double(8,2) DEFAULT '0.00',
  11. `shipping_cost` double(8,2) DEFAULT '0.00',
  12. `discount` double(10,2) NOT NULL DEFAULT '0.00',
  13. `coupon_code` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  14. `coupon_applied` tinyint(4) NOT NULL DEFAULT '0',
  15. `quantity` int(11) NOT NULL DEFAULT '0',
  16. `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  17. `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
  18. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  19. ALTER TABLE `carts`
  20. ADD PRIMARY KEY (`id`);
  21. ALTER TABLE `carts`
  22. MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=57;
  23. UPDATE `business_settings` SET `value` = '4.3' WHERE `business_settings`.`type` = 'current_version';
  24. COMMIT;