v29.sql 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'shipping_type', 'product_wise_shipping', current_timestamp(), current_timestamp());
  2. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'flat_rate_shipping_cost', '0', current_timestamp(), current_timestamp());
  3. INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'shipping_cost_admin', '0', current_timestamp(), current_timestamp());
  4. ALTER TABLE `shops` ADD `shipping_cost` DOUBLE(8,2) NOT NULL DEFAULT '0' AFTER `pick_up_point_id`;
  5. ALTER TABLE `products` CHANGE `shipping_type` `shipping_type` VARCHAR(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT 'flat_rate';
  6. ALTER TABLE `orders` CHANGE `delivery_viewed` `delivery_viewed` INT(1) NOT NULL DEFAULT '1';
  7. ALTER TABLE `orders` CHANGE `payment_status_viewed` `payment_status_viewed` INT(1) NULL DEFAULT '1';
  8. ALTER TABLE `countries` ADD `status` INT(1) NOT NULL DEFAULT '1' AFTER `name`;
  9. ALTER TABLE `countries` ADD `created_at` TIMESTAMP NULL DEFAULT NULL AFTER `status`, ADD `updated_at` TIMESTAMP NULL DEFAULT NULL AFTER `created_at`;
  10. UPDATE `business_settings` SET `value` = '2.9' WHERE `business_settings`.`type` = 'current_version';
  11. -- phpMyAdmin SQL Dump
  12. -- version 4.9.0.1
  13. -- https://www.phpmyadmin.net/
  14. --
  15. -- Host: 127.0.0.1
  16. -- Generation Time: Jul 01, 2020 at 03:47 PM
  17. -- Server version: 10.3.16-MariaDB
  18. -- PHP Version: 7.3.7
  19. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  20. SET AUTOCOMMIT = 0;
  21. START TRANSACTION;
  22. SET time_zone = "+00:00";
  23. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  24. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  25. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  26. /*!40101 SET NAMES utf8mb4 */;
  27. --
  28. -- Database: `shop_demo`
  29. --
  30. -- --------------------------------------------------------
  31. --
  32. -- Table structure for table `addresses`
  33. --
  34. CREATE TABLE `addresses` (
  35. `id` int(11) NOT NULL,
  36. `user_id` int(11) NOT NULL,
  37. `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  38. `country` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  39. `city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  40. `postal_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  41. `phone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  42. `set_default` int(1) NOT NULL DEFAULT 0,
  43. `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  44. `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
  45. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  46. --
  47. -- Indexes for dumped tables
  48. --
  49. --
  50. -- Indexes for table `addresses`
  51. --
  52. ALTER TABLE `addresses`
  53. ADD PRIMARY KEY (`id`);
  54. --
  55. -- AUTO_INCREMENT for dumped tables
  56. --
  57. --
  58. -- AUTO_INCREMENT for table `addresses`
  59. --
  60. ALTER TABLE `addresses`
  61. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  62. COMMIT;
  63. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  64. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  65. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  66. -- phpMyAdmin SQL Dump
  67. -- version 4.9.0.1
  68. -- https://www.phpmyadmin.net/
  69. --
  70. -- Host: 127.0.0.1
  71. -- Generation Time: Jul 01, 2020 at 03:48 PM
  72. -- Server version: 10.3.16-MariaDB
  73. -- PHP Version: 7.3.7
  74. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  75. SET AUTOCOMMIT = 0;
  76. START TRANSACTION;
  77. SET time_zone = "+00:00";
  78. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  79. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  80. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  81. /*!40101 SET NAMES utf8mb4 */;
  82. --
  83. -- Database: `shop_demo`
  84. --
  85. -- --------------------------------------------------------
  86. --
  87. -- Table structure for table `pages`
  88. --
  89. CREATE TABLE `pages` (
  90. `id` int(11) NOT NULL,
  91. `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  92. `slug` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  93. `content` text COLLATE utf8_unicode_ci DEFAULT NULL,
  94. `meta_title` text COLLATE utf8_unicode_ci DEFAULT NULL,
  95. `meta_description` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
  96. `keywords` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
  97. `meta_image` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  98. `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  99. `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
  100. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  101. --
  102. -- Indexes for dumped tables
  103. --
  104. --
  105. -- Indexes for table `pages`
  106. --
  107. ALTER TABLE `pages`
  108. ADD PRIMARY KEY (`id`);
  109. --
  110. -- AUTO_INCREMENT for dumped tables
  111. --
  112. --
  113. -- AUTO_INCREMENT for table `pages`
  114. --
  115. ALTER TABLE `pages`
  116. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  117. COMMIT;
  118. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  119. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  120. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;