v39.sql 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. ALTER TABLE `categories` ADD INDEX(`slug`);
  2. ALTER TABLE `products` ADD INDEX(`name`);
  3. ALTER TABLE `products` CHANGE `tags` `tags` VARCHAR(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
  4. ALTER TABLE `products` ADD INDEX(`tags`);
  5. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'nagad', '0', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
  6. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'bkash', '0', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
  7. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'bkash_sandbox', '1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
  8. CREATE TABLE `cities` (
  9. `id` int(11) NOT NULL,
  10. `country_id` int(11) NOT NULL,
  11. `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  12. `cost` double(20,2) NOT NULL DEFAULT '0.00',
  13. `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  14. `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
  15. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  16. ALTER TABLE `cities`
  17. ADD PRIMARY KEY (`id`);
  18. ALTER TABLE `cities`
  19. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  20. CREATE TABLE `city_translations` (
  21. `id` int(11) NOT NULL,
  22. `city_id` int(11) NOT NULL,
  23. `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  24. `lang` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  25. `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  26. `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
  27. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  28. ALTER TABLE `city_translations`
  29. ADD PRIMARY KEY (`id`);
  30. ALTER TABLE `city_translations`
  31. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  32. ALTER TABLE `products` ADD `seller_featured` INT NOT NULL DEFAULT '0' AFTER `featured`;
  33. UPDATE `business_settings` SET `value` = '3.9' WHERE `business_settings`.`type` = 'current_version';
  34. ALTER TABLE `sellers` ADD UNIQUE(`user_id`);
  35. COMMIT;