v17.sql 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. UPDATE `business_settings` SET `value` = '1.7' WHERE `business_settings`.`type` = 'current_version';
  2. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'pickup_point', '0', current_timestamp(), current_timestamp());
  3. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'maintenance_mode', '0', current_timestamp(), current_timestamp());
  4. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'voguepay', '0', current_timestamp(), current_timestamp());
  5. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'voguepay_sandbox', '0', current_timestamp(), current_timestamp());
  6. CREATE TABLE `pickup_points` (
  7. `id` int(11) NOT NULL,
  8. `staff_id` int(11) NOT NULL,
  9. `name` varchar(255) NOT NULL,
  10. `address` text NOT NULL,
  11. `phone` varchar(15) NOT NULL,
  12. `pick_up_status` int(1) DEFAULT NULL,
  13. `cash_on_pickup_status` int(1) DEFAULT NULL,
  14. `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  15. `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
  16. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  17. ALTER TABLE `pickup_points` ADD PRIMARY KEY (`id`);
  18. ALTER TABLE `pickup_points` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  19. ALTER TABLE `tickets` ADD `client_viewed` INT(1) NOT NULL DEFAULT '0' AFTER `viewed`;
  20. ALTER TABLE `sellers` ADD `voguepay_status` INT(1) NOT NULL DEFAULT '0' AFTER `paystack_secret_key`;
  21. ALTER TABLE `sellers` ADD `voguepay_merchand_id` VARCHAR(255) NULL DEFAULT NULL AFTER `voguepay_status`;
  22. CREATE TABLE `seller_withdraw_requests` (
  23. `id` int(11) NOT NULL,
  24. `user_id` int(11) DEFAULT NULL,
  25. `amount` double(8,2) DEFAULT NULL,
  26. `message` longtext DEFAULT NULL,
  27. `status` int(1) DEFAULT NULL,
  28. `viewed` int(1) DEFAULT NULL,
  29. `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  30. `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
  31. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  32. ALTER TABLE `seller_withdraw_requests` ADD PRIMARY KEY (`id`);
  33. ALTER TABLE `seller_withdraw_requests` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  34. ALTER TABLE `reviews` ADD `viewed` INT(1) NOT NULL DEFAULT '0' AFTER `status`;
  35. ALTER TABLE `orders` ADD `delivery_viewed` INT(1) NOT NULL DEFAULT '0' AFTER `viewed`;
  36. ALTER TABLE `orders` ADD `payment_status_viewed` INT(1) NULL DEFAULT '0' AFTER `delivery_viewed`;
  37. ALTER TABLE `order_details` ADD `shipping_type` VARCHAR(255) NULL DEFAULT NULL AFTER `delivery_status`;
  38. ALTER TABLE `order_details` ADD `pickup_point_id` INT(11) NULL DEFAULT NULL AFTER `shipping_type`;