v18.sql 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. UPDATE `business_settings` SET `value` = '1.8' WHERE `business_settings`.`type` = 'current_version';
  2. CREATE TABLE `conversations`
  3. ( `id` int(11) NOT NULL,
  4. `sender_id` int(11) NOT NULL,
  5. `receiver_id` int(11) NOT NULL,
  6. `title` varchar(1000) COLLATE utf32_unicode_ci DEFAULT NULL,
  7. `sender_viewed` int(11) NOT NULL DEFAULT 1,
  8. `receiver_viewed` int(11) NOT NULL DEFAULT 0,
  9. `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  10. `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
  11. ) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_unicode_ci;
  12. ALTER TABLE `conversations` ADD PRIMARY KEY (`id`);
  13. ALTER TABLE `conversations` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  14. CREATE TABLE `messages`
  15. ( `id` int(11) NOT NULL,
  16. `conversation_id` int(11) NOT NULL,
  17. `user_id` int(11) NOT NULL,
  18. `message` text COLLATE utf32_unicode_ci DEFAULT NULL,
  19. `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  20. `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
  21. ) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_unicode_ci;
  22. ALTER TABLE `messages` ADD PRIMARY KEY (`id`);
  23. ALTER TABLE `messages` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  24. ALTER TABLE `categories` ADD `commision_rate` FLOAT(8,2) NOT NULL DEFAULT 0 AFTER `name`;
  25. ALTER TABLE `sliders` ADD `link` VARCHAR(255) NULL DEFAULT NULL AFTER `published`;
  26. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'category_wise_commission', '0', current_timestamp(), current_timestamp());
  27. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'conversation_system', '0', current_timestamp(), current_timestamp());
  28. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'guest_checkout_active', '1', current_timestamp(), current_timestamp());
  29. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'facebook_pixel', '0', current_timestamp(), current_timestamp());