v49.sql 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. UPDATE `business_settings` SET `value` = '4.9' WHERE `business_settings`.`type` = 'current_version';
  2. ALTER TABLE `addresses` ADD `longitude` FLOAT NULL AFTER `city`, ADD `latitude` FLOAT NULL AFTER `longitude`;
  3. ALTER TABLE `users` ADD `device_token` VARCHAR(255) NULL DEFAULT NULL AFTER `remember_token`;
  4. ALTER TABLE `carts` ADD `product_referral_code` VARCHAR(255) NULL DEFAULT NULL AFTER `discount`;
  5. ALTER TABLE `products` ADD `approved` TINYINT(1) NOT NULL DEFAULT '1' AFTER `published`;
  6. ALTER TABLE `business_settings` ADD `lang` varchar(30) DEFAULT NULL AFTER `value`;
  7. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'google_map', '0', current_timestamp(), current_timestamp());
  8. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'google_firebase', '0', current_timestamp(), current_timestamp());
  9. --
  10. -- Table structure for table `notifications`
  11. --
  12. CREATE TABLE `notifications` (
  13. `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  14. `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  15. `notifiable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  16. `notifiable_id` bigint(20) UNSIGNED NOT NULL,
  17. `data` text COLLATE utf8mb4_unicode_ci NOT NULL,
  18. `read_at` timestamp NULL DEFAULT NULL,
  19. `created_at` timestamp NULL DEFAULT NULL,
  20. `updated_at` timestamp NULL DEFAULT NULL
  21. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  22. --
  23. -- Indexes for dumped tables
  24. --
  25. --
  26. -- Indexes for table `notifications`
  27. --
  28. ALTER TABLE `notifications`
  29. ADD PRIMARY KEY (`id`),
  30. ADD KEY `notifications_notifiable_type_notifiable_id_index` (`notifiable_type`,`notifiable_id`);
  31. COMMIT;