|
| 1 | +-- phpMyAdmin SQL Dump |
| 2 | +-- version 4.8.0.1 |
| 3 | +-- https://www.phpmyadmin.net/ |
| 4 | +-- |
| 5 | +-- Host: 127.0.0.1 |
| 6 | +-- Generation Time: Jul 29, 2018 at 11:54 PM |
| 7 | +-- Server version: 10.1.32-MariaDB |
| 8 | +-- PHP Version: 7.2.5 |
| 9 | + |
| 10 | +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
| 11 | +SET AUTOCOMMIT = 0; |
| 12 | +START TRANSACTION; |
| 13 | +SET time_zone = "+00:00"; |
| 14 | + |
| 15 | + |
| 16 | +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; |
| 17 | +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; |
| 18 | +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; |
| 19 | +/*!40101 SET NAMES utf8mb4 */; |
| 20 | + |
| 21 | +-- |
| 22 | +-- Database: `codecave` |
| 23 | +-- |
| 24 | + |
| 25 | +-- -------------------------------------------------------- |
| 26 | + |
| 27 | +-- |
| 28 | +-- Table structure for table `answers` |
| 29 | +-- |
| 30 | + |
| 31 | +CREATE TABLE `answers` ( |
| 32 | + `id` int(255) NOT NULL, |
| 33 | + `answers` longtext NOT NULL, |
| 34 | + `questionsID` int(255) NOT NULL |
| 35 | +) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 36 | + |
| 37 | +-- |
| 38 | +-- Dumping data for table `answers` |
| 39 | +-- |
| 40 | + |
| 41 | +INSERT INTO `answers` (`id`, `answers`, `questionsID`) VALUES |
| 42 | +( 101706, ',{\"ans\":\"ans1\",\"email\":\"[email protected]\"},{\"ans\":\"ans2\",\"email\":\"[email protected]\"},{\"ans\":\"l;akdj;la\",\"email\":\"kim@kim\"}', 46), |
| 43 | +( 101707, ',{\"ans\":\"Convert object string to JSON\",\"email\":\"[email protected]\"},{\"ans\":\"al;kjdl;skfjasfdlkjfdsdfmazcxv,.mzx,.vnc.,xmcvn.zx,vmnc,.zxnvc,.xznv,xznv,xnv,xznv,.nzxv,c.nzx,.vn.,zxnv,.znxv.,nzx.,vnzx,.vnc,.zxvn,.zxnv.,xznv,.zxnv,.nxz,.vnzx,v\nal;kjdl;skfjasfdlkjfdsdfmazcxv,.mzx,.vnc.,xmcvn.zx,vmnc,.zxnvc,.xznv,xznv,xnv,xznv,.nzxv,c.nzx,.vn.,zxnv,.znxv.,nzx.,vnzx,.vnc,.zxvn,.zxnv.,xznv,.zxnv,.nxz,.vnzx,v\nal;kjdl;skfjasfdlkjfdsdfmazcxv,.mzx,.vnc.,xmcvn.zx,vmnc,.zxnvc,.xznv,xznv,xnv,xznv,.nzxv,c.nzx,.vn.,zxnv,.znxv.,nzx.,vnzx,.vnc,.zxvn,.zxnv.,xznv,.zxnv,.nxz,.vnzx,v\nal;kjdl;skfjasfdlkjfdsdfmazcxv,.mzx,.vnc.,xmcvn.zx,vmnc,.zxnvc,.xznv,xznv,xnv,xznv,.nzxv,c.nzx,.vn.,zxnv,.znxv.,nzx.,vnzx,.vnc,.zxvn,.zxnv.,xznv,.zxnv,.nxz,.vnzx,v\",\"email\":\"kim@kim\"}', 47), |
| 44 | +(101708, ',{\"ans\":\"Just apply this {][]lkaflaknfl\",\"email\":\"kim@kim\"}', 48), |
| 45 | +(101709, '', 49), |
| 46 | +( 101710, ',{\"ans\":\"Simple Input with two items\nSimple Input with two items\nSimple Input with two items\nSimple Input with two items\",\"email\":\"[email protected]\"},{\"ans\":\"Simple Input with two items\nSimple Input with two items\nSimple Input with two items\nSimple Input with two items\nSimple Input with two items\nSimple Input with two items\nSimple Input with two items\nSimple Input with two items\nSimple Input with two items\nSimple Input with two items\nSimple Input with two items\nSimple Input with two items\",\"email\":\"[email protected]\"}', 50), |
| 47 | +(101711, '', 51), |
| 48 | +(101712, '', 52), |
| 49 | +(101713, '', 53), |
| 50 | +(101714, '', 54), |
| 51 | +( 101715, ',{\"ans\":\"tag2\",\"email\":\"[email protected]\"}', 55), |
| 52 | +( 101716, ',{\"ans\":\"You could use reduce for getting start and end part of the route and return the end for the next start.\",\"email\":\"[email protected]\"},{\"ans\":\"a;ldhal;k\",\"email\":\"[email protected]\"},{\"ans\":\"Another approach is to use map method in combination with slice. For map function, you have to pass a callback function as argument which will be applied for every item from your given array.\",\"email\":\"[email protected]\"}', 56), |
| 53 | +( 101717, ',{\"ans\":\"You could use reduce for getting start and end part of the route and return the end for the next start.\",\"email\":\"[email protected]\"},{\"ans\":\"Another approach is to use map method in combination with slice. For map function, you have to pass a callback function as argument which will be applied for every item from your given array.\",\"email\":\"kim@kim\"},{\"ans\":\"Another approach is to use map method in combination with slice. For map function, you have to pass a callback function as argument which will be applied for every item from your given array.\",\"email\":\"kim@kim\"}', 57), |
| 54 | +( 101718, ',{\"ans\":\"This should do the trick\",\"email\":\"[email protected]\"},{\"ans\":\"original\",\"email\":\"[email protected]\"}', 58); |
| 55 | + |
| 56 | +-- -------------------------------------------------------- |
| 57 | + |
| 58 | +-- |
| 59 | +-- Table structure for table `creates` |
| 60 | +-- |
| 61 | + |
| 62 | +CREATE TABLE `creates` ( |
| 63 | + `id` int(11) NOT NULL, |
| 64 | + `userName` varchar(255) DEFAULT NULL, |
| 65 | + `password` varchar(255) DEFAULT NULL, |
| 66 | + `email` varchar(255) DEFAULT NULL, |
| 67 | + `token` varchar(255) NOT NULL, |
| 68 | + `createdAt` datetime NOT NULL, |
| 69 | + `updatedAt` datetime NOT NULL, |
| 70 | + `questions` varchar(255) NOT NULL |
| 71 | +) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 72 | + |
| 73 | +-- |
| 74 | +-- Dumping data for table `creates` |
| 75 | +-- |
| 76 | + |
| 77 | +INSERT INTO `creates` (`id`, `userName`, `password`, `email`, `token`, `createdAt`, `updatedAt`, `questions`) VALUES |
| 78 | +( 9, 'zin', '$2a$10$xzULVwOJZliDW0MjODx0UONKix6JVmGd1UpMybdS62I8xvuBGam0q', '[email protected]', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJVc2VySUQiOjksImlhdCI6MTUyOTg3NDg0M30.Au7IhC-9f_OUbXO54QJGyuFRqwz7SNU7RxRQ4nztTaI', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'ans1'), |
| 79 | +( 11, 'dev', '$2a$10$T5KbbrhwSMUW9GQFBMjUIeQXzBWMWWSZ7u52vzjoygA3eh56Th3lG', '[email protected]', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJVc2VySUQiOjE3LCJpYXQiOjE1MzIxODIzOTV9.qAnDYdmHfxRtQgzahCAtlHnnJMmrw1wzhaVrvWz2eCI', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'ans2'), |
| 80 | +( 12, 'abc@gmaiol', '$2a$10$HRQu8oSsuLFxtiEwWU7NGu9QFA8Ao65ubFnP22QxUfUVfoNTYiAT.', '[email protected]', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJVc2VySUQiOjEyLCJpYXQiOjE1Mjk5NDQ0MDR9.hfF1YYq9F7tUL9FsowZcR5_-A9IYAHBJY9nWBq4nAjU', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'ans3'), |
| 81 | +(13, 'kim', '$2a$10$tTjTbjgQuLgvOwh.k8KO/u91K0RTPKBFPGLw4BUsgj8JYXXo59b9S', 'kim@kim', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJVc2VySUQiOjEzLCJpYXQiOjE1MzIyNzQyMjh9.zLkfl3epu9EJ25kNN1bvUCqJ4V6nROv7ZQkh-gT8gN8', '0000-00-00 00:00:00', '0000-00-00 00:00:00', ''), |
| 82 | +( 14, 'jhon', '$2a$10$fGXFGYm4iAMkuPc9nIMYpu7ZgtiKIX5he6tKM05/q4PdT89E1805C', '[email protected]', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', ''); |
| 83 | + |
| 84 | +-- -------------------------------------------------------- |
| 85 | + |
| 86 | +-- |
| 87 | +-- Table structure for table `questions` |
| 88 | +-- |
| 89 | + |
| 90 | +CREATE TABLE `questions` ( |
| 91 | + `id` int(11) NOT NULL, |
| 92 | + `email` varchar(255) NOT NULL, |
| 93 | + `title` varchar(255) NOT NULL, |
| 94 | + `question` varchar(255) NOT NULL, |
| 95 | + `tags` longtext NOT NULL, |
| 96 | + `vote` int(11) NOT NULL, |
| 97 | + `dated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP |
| 98 | +) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 99 | + |
| 100 | +-- |
| 101 | +-- Dumping data for table `questions` |
| 102 | +-- |
| 103 | + |
| 104 | +INSERT INTO `questions` (`id`, `email`, `title`, `question`, `tags`, `vote`, `dated`) VALUES |
| 105 | +( 57, '[email protected]', 'Convert array to array of objects with reduce', 'I want to convert optimizedRoute to result. I want to do this with ES6 .reduce(). Here is what I\'ve tried:', '[{\"display\":\"Javascript\",\"value\":\"Javascript\"},{\"display\":\"ReactJs\",\"value\":\"ReactJs\"}]', 0, '2018-07-29 11:22:23'), |
| 106 | +( 58, '[email protected]', 'How can I reverse an array in JavaScript without using libraries?', 'I am saving some data in order using arrays, and I want to add a function that the user can reverse the list. I can\'t think of any possible method, so if anybody knows how, please help.', '[{\"display\":\"Javascript\",\"value\":\"Javascript\"}]', 2, '2018-07-29 14:43:47'); |
| 107 | + |
| 108 | +-- -------------------------------------------------------- |
| 109 | + |
| 110 | +-- |
| 111 | +-- Table structure for table `sequelizemeta` |
| 112 | +-- |
| 113 | + |
| 114 | +CREATE TABLE `sequelizemeta` ( |
| 115 | + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL |
| 116 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 117 | + |
| 118 | +-- |
| 119 | +-- Dumping data for table `sequelizemeta` |
| 120 | +-- |
| 121 | + |
| 122 | +INSERT INTO `sequelizemeta` (`name`) VALUES |
| 123 | +('20171125081128-create-user.js'), |
| 124 | +('20171125081136-create-task.js'), |
| 125 | +('20180619115401-create-create.js'); |
| 126 | + |
| 127 | +-- -------------------------------------------------------- |
| 128 | + |
| 129 | +-- |
| 130 | +-- Table structure for table `tasks` |
| 131 | +-- |
| 132 | + |
| 133 | +CREATE TABLE `tasks` ( |
| 134 | + `id` int(11) NOT NULL, |
| 135 | + `title` varchar(255) DEFAULT NULL, |
| 136 | + `createdAt` datetime NOT NULL, |
| 137 | + `updatedAt` datetime NOT NULL, |
| 138 | + `UserId` int(11) NOT NULL |
| 139 | +) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 140 | + |
| 141 | +-- -------------------------------------------------------- |
| 142 | + |
| 143 | +-- |
| 144 | +-- Table structure for table `users` |
| 145 | +-- |
| 146 | + |
| 147 | +CREATE TABLE `users` ( |
| 148 | + `id` int(11) NOT NULL, |
| 149 | + `username` varchar(255) DEFAULT NULL, |
| 150 | + `createdAt` datetime NOT NULL, |
| 151 | + `updatedAt` datetime NOT NULL |
| 152 | +) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 153 | + |
| 154 | +-- |
| 155 | +-- Indexes for dumped tables |
| 156 | +-- |
| 157 | + |
| 158 | +-- |
| 159 | +-- Indexes for table `answers` |
| 160 | +-- |
| 161 | +ALTER TABLE `answers` |
| 162 | + ADD PRIMARY KEY (`id`); |
| 163 | + |
| 164 | +-- |
| 165 | +-- Indexes for table `creates` |
| 166 | +-- |
| 167 | +ALTER TABLE `creates` |
| 168 | + ADD PRIMARY KEY (`id`); |
| 169 | + |
| 170 | +-- |
| 171 | +-- Indexes for table `questions` |
| 172 | +-- |
| 173 | +ALTER TABLE `questions` |
| 174 | + ADD PRIMARY KEY (`id`), |
| 175 | + ADD UNIQUE KEY `vote` (`id`); |
| 176 | + |
| 177 | +-- |
| 178 | +-- Indexes for table `sequelizemeta` |
| 179 | +-- |
| 180 | +ALTER TABLE `sequelizemeta` |
| 181 | + ADD PRIMARY KEY (`name`), |
| 182 | + ADD UNIQUE KEY `name` (`name`), |
| 183 | + ADD UNIQUE KEY `SequelizeMeta_name_unique` (`name`); |
| 184 | + |
| 185 | +-- |
| 186 | +-- Indexes for table `tasks` |
| 187 | +-- |
| 188 | +ALTER TABLE `tasks` |
| 189 | + ADD PRIMARY KEY (`id`), |
| 190 | + ADD KEY `UserId` (`UserId`); |
| 191 | + |
| 192 | +-- |
| 193 | +-- Indexes for table `users` |
| 194 | +-- |
| 195 | +ALTER TABLE `users` |
| 196 | + ADD PRIMARY KEY (`id`); |
| 197 | + |
| 198 | +-- |
| 199 | +-- AUTO_INCREMENT for dumped tables |
| 200 | +-- |
| 201 | + |
| 202 | +-- |
| 203 | +-- AUTO_INCREMENT for table `answers` |
| 204 | +-- |
| 205 | +ALTER TABLE `answers` |
| 206 | + MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=101719; |
| 207 | + |
| 208 | +-- |
| 209 | +-- AUTO_INCREMENT for table `creates` |
| 210 | +-- |
| 211 | +ALTER TABLE `creates` |
| 212 | + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; |
| 213 | + |
| 214 | +-- |
| 215 | +-- AUTO_INCREMENT for table `questions` |
| 216 | +-- |
| 217 | +ALTER TABLE `questions` |
| 218 | + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=59; |
| 219 | + |
| 220 | +-- |
| 221 | +-- AUTO_INCREMENT for table `tasks` |
| 222 | +-- |
| 223 | +ALTER TABLE `tasks` |
| 224 | + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; |
| 225 | + |
| 226 | +-- |
| 227 | +-- AUTO_INCREMENT for table `users` |
| 228 | +-- |
| 229 | +ALTER TABLE `users` |
| 230 | + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; |
| 231 | + |
| 232 | +-- |
| 233 | +-- Constraints for dumped tables |
| 234 | +-- |
| 235 | + |
| 236 | +-- |
| 237 | +-- Constraints for table `tasks` |
| 238 | +-- |
| 239 | +ALTER TABLE `tasks` |
| 240 | + ADD CONSTRAINT `tasks_ibfk_1` FOREIGN KEY (`UserId`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; |
| 241 | +COMMIT; |
| 242 | + |
| 243 | +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; |
| 244 | +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; |
| 245 | +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
0 commit comments