v20.sql 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. UPDATE `business_settings` SET `value` = '2.0' WHERE `business_settings`.`type` = 'current_version';
  2. -- phpMyAdmin SQL Dump
  3. -- version 4.9.0.1
  4. -- https://www.phpmyadmin.net/
  5. --
  6. -- Host: 127.0.0.1
  7. -- Generation Time: Mar 08, 2020 at 11:37 AM
  8. -- Server version: 10.3.16-MariaDB
  9. -- PHP Version: 7.3.7
  10. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  11. SET AUTOCOMMIT = 0;
  12. START TRANSACTION;
  13. SET time_zone = "+00:00";
  14. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  15. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  16. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  17. /*!40101 SET NAMES utf8mb4 */;
  18. --
  19. -- Database: `shop`
  20. --
  21. -- --------------------------------------------------------
  22. --
  23. -- Table structure for table `addons`
  24. --
  25. CREATE TABLE `addons` (
  26. `id` int(11) NOT NULL,
  27. `name` varchar(255) COLLATE utf32_unicode_ci DEFAULT NULL,
  28. `unique_identifier` varchar(255) COLLATE utf32_unicode_ci DEFAULT NULL,
  29. `version` varchar(255) COLLATE utf32_unicode_ci DEFAULT NULL,
  30. `activated` int(1) NOT NULL DEFAULT 1,
  31. `image` varchar(1000) COLLATE utf32_unicode_ci DEFAULT NULL,
  32. `created_at` timestamp NULL DEFAULT current_timestamp(),
  33. `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
  34. ) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_unicode_ci;
  35. --
  36. -- Indexes for dumped tables
  37. --
  38. --
  39. -- Indexes for table `addons`
  40. --
  41. ALTER TABLE `addons`
  42. ADD PRIMARY KEY (`id`);
  43. --
  44. -- AUTO_INCREMENT for dumped tables
  45. --
  46. --
  47. -- AUTO_INCREMENT for table `addons`
  48. --
  49. ALTER TABLE `addons`
  50. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
  51. COMMIT;
  52. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  53. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  54. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  55. -- phpMyAdmin SQL Dump
  56. -- version 4.9.0.1
  57. -- https://www.phpmyadmin.net/
  58. --
  59. -- Host: 127.0.0.1
  60. -- Generation Time: Mar 08, 2020 at 11:38 AM
  61. -- Server version: 10.3.16-MariaDB
  62. -- PHP Version: 7.3.7
  63. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  64. SET AUTOCOMMIT = 0;
  65. START TRANSACTION;
  66. SET time_zone = "+00:00";
  67. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  68. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  69. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  70. /*!40101 SET NAMES utf8mb4 */;
  71. --
  72. -- Database: `shop`
  73. --
  74. -- --------------------------------------------------------
  75. --
  76. -- Table structure for table `attributes`
  77. --
  78. CREATE TABLE `attributes` (
  79. `id` int(11) NOT NULL,
  80. `name` varchar(255) COLLATE utf32_unicode_ci DEFAULT NULL,
  81. `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  82. `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
  83. ) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_unicode_ci;
  84. --
  85. -- Dumping data for table `attributes`
  86. --
  87. INSERT INTO `attributes` (`id`, `name`, `created_at`, `updated_at`) VALUES
  88. (1, 'Size', '2020-02-24 05:55:07', '2020-02-24 05:55:07'),
  89. (2, 'Fabric', '2020-02-24 05:55:13', '2020-02-24 05:55:13');
  90. --
  91. -- Indexes for dumped tables
  92. --
  93. --
  94. -- Indexes for table `attributes`
  95. --
  96. ALTER TABLE `attributes`
  97. ADD PRIMARY KEY (`id`);
  98. --
  99. -- AUTO_INCREMENT for dumped tables
  100. --
  101. --
  102. -- AUTO_INCREMENT for table `attributes`
  103. --
  104. ALTER TABLE `attributes`
  105. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  106. COMMIT;
  107. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  108. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  109. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  110. -- phpMyAdmin SQL Dump
  111. -- version 4.9.0.1
  112. -- https://www.phpmyadmin.net/
  113. --
  114. -- Host: 127.0.0.1
  115. -- Generation Time: Mar 08, 2020 at 11:43 AM
  116. -- Server version: 10.3.16-MariaDB
  117. -- PHP Version: 7.3.7
  118. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  119. SET AUTOCOMMIT = 0;
  120. START TRANSACTION;
  121. SET time_zone = "+00:00";
  122. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  123. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  124. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  125. /*!40101 SET NAMES utf8mb4 */;
  126. --
  127. -- Database: `shop`
  128. --
  129. -- --------------------------------------------------------
  130. --
  131. -- Table structure for table `product_stocks`
  132. --
  133. DROP TABLE IF EXISTS `product_stocks`;
  134. CREATE TABLE `product_stocks` (
  135. `id` int(11) NOT NULL,
  136. `product_id` int(11) NOT NULL,
  137. `variant` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  138. `sku` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  139. `price` double(10,2) NOT NULL DEFAULT 0.00,
  140. `qty` int(11) NOT NULL DEFAULT 0,
  141. `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  142. `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
  143. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  144. --
  145. -- Indexes for dumped tables
  146. --
  147. --
  148. -- Indexes for table `product_stocks`
  149. --
  150. ALTER TABLE `product_stocks`
  151. ADD PRIMARY KEY (`id`);
  152. --
  153. -- AUTO_INCREMENT for dumped tables
  154. --
  155. --
  156. -- AUTO_INCREMENT for table `product_stocks`
  157. --
  158. ALTER TABLE `product_stocks`
  159. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  160. COMMIT;
  161. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  162. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  163. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  164. ALTER TABLE `products` ADD `variant_product` INT(1) NOT NULL DEFAULT '0' AFTER `purchase_price`, ADD `attributes` VARCHAR(1000) NULL DEFAULT '[]' AFTER `variant_product`;
  165. ALTER TABLE `users` ADD `referred_by` INT NULL DEFAULT NULL AFTER `id`;
  166. ALTER TABLE `users` ADD `referral_code` VARCHAR(255) NULL DEFAULT NULL AFTER `balance`;