· 8 years ago · May 15, 2018, 05:14 PM
1-- MySQL dump 10.13 Distrib 5.7.11, for Win64 (x86_64)
2--
3-- Host: localhost Database: canbiz
4-- ------------------------------------------------------
5-- Server version 5.7.11-log
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Table structure for table `auth`
20--
21
22DROP TABLE IF EXISTS `auth`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `auth` (
26 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
27 `name` varchar(50) DEFAULT NULL,
28 `email` varchar(50) NOT NULL,
29 `phoneNo` varchar(15) DEFAULT NULL,
30 `password` varchar(100) NOT NULL,
31 `fcmToken` varchar(350) DEFAULT NULL,
32 `securityQuestion` varchar(100) NOT NULL,
33 `securityAnswer` varchar(50) NOT NULL,
34 `creationDate` datetime NOT NULL,
35 PRIMARY KEY (`id`)
36) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
37/*!40101 SET character_set_client = @saved_cs_client */;
38
39--
40-- Dumping data for table `auth`
41--
42
43LOCK TABLES `auth` WRITE;
44/*!40000 ALTER TABLE `auth` DISABLE KEYS */;
45INSERT INTO `auth` VALUES (1,'Pam','admin@gmail.com','0000000000','HELLO',NULL,'Where are you?','Home','2018-05-05 22:36:30');
46/*!40000 ALTER TABLE `auth` ENABLE KEYS */;
47UNLOCK TABLES;
48
49--
50-- Table structure for table `category`
51--
52
53DROP TABLE IF EXISTS `category`;
54/*!40101 SET @saved_cs_client = @@character_set_client */;
55/*!40101 SET character_set_client = utf8 */;
56CREATE TABLE `category` (
57 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
58 `name` varchar(100) NOT NULL,
59 `imageLink` varchar(200) NOT NULL,
60 `description` varchar(100) DEFAULT NULL,
61 PRIMARY KEY (`id`)
62) ENGINE=InnoDB DEFAULT CHARSET=utf8;
63/*!40101 SET character_set_client = @saved_cs_client */;
64
65--
66-- Dumping data for table `category`
67--
68
69LOCK TABLES `category` WRITE;
70/*!40000 ALTER TABLE `category` DISABLE KEYS */;
71/*!40000 ALTER TABLE `category` ENABLE KEYS */;
72UNLOCK TABLES;
73
74--
75-- Table structure for table `customer`
76--
77
78DROP TABLE IF EXISTS `customer`;
79/*!40101 SET @saved_cs_client = @@character_set_client */;
80/*!40101 SET character_set_client = utf8 */;
81CREATE TABLE `customer` (
82 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
83 `organisationOrPerson` enum('Y','N') NOT NULL,
84 `organisationName` varchar(100) DEFAULT NULL,
85 `firstName` varchar(100) NOT NULL,
86 `lastName` varchar(100) NOT NULL,
87 `email` varchar(50) NOT NULL,
88 `pass` varchar(200) NOT NULL,
89 `phone` varchar(15) NOT NULL,
90 `houseNo` varchar(10) DEFAULT NULL,
91 `addressLine1` varchar(50) DEFAULT NULL,
92 `addressLine2` varchar(50) DEFAULT NULL,
93 `addressLine3` varchar(50) DEFAULT NULL,
94 `city` varchar(50) NOT NULL,
95 `state` varchar(50) NOT NULL,
96 `zip` char(6) NOT NULL,
97 `country` varchar(50) NOT NULL,
98 `creationDate` date NOT NULL,
99 `dob` date NOT NULL,
100 PRIMARY KEY (`id`)
101) ENGINE=InnoDB DEFAULT CHARSET=utf8;
102/*!40101 SET character_set_client = @saved_cs_client */;
103
104--
105-- Dumping data for table `customer`
106--
107
108LOCK TABLES `customer` WRITE;
109/*!40000 ALTER TABLE `customer` DISABLE KEYS */;
110/*!40000 ALTER TABLE `customer` ENABLE KEYS */;
111UNLOCK TABLES;
112
113--
114-- Table structure for table `images`
115--
116
117DROP TABLE IF EXISTS `images`;
118/*!40101 SET @saved_cs_client = @@character_set_client */;
119/*!40101 SET character_set_client = utf8 */;
120CREATE TABLE `images` (
121 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
122 `imageLink` varchar(200) NOT NULL,
123 `productId` int(10) unsigned NOT NULL,
124 PRIMARY KEY (`id`),
125 KEY `productId` (`productId`),
126 CONSTRAINT `images_ibfk_1` FOREIGN KEY (`productId`) REFERENCES `product` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
127) ENGINE=InnoDB DEFAULT CHARSET=utf8;
128/*!40101 SET character_set_client = @saved_cs_client */;
129
130--
131-- Dumping data for table `images`
132--
133
134LOCK TABLES `images` WRITE;
135/*!40000 ALTER TABLE `images` DISABLE KEYS */;
136/*!40000 ALTER TABLE `images` ENABLE KEYS */;
137UNLOCK TABLES;
138
139--
140-- Table structure for table `invoice`
141--
142
143DROP TABLE IF EXISTS `invoice`;
144/*!40101 SET @saved_cs_client = @@character_set_client */;
145/*!40101 SET character_set_client = utf8 */;
146CREATE TABLE `invoice` (
147 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
148 `ordersId` int(10) unsigned NOT NULL,
149 `invoiceStatusId` int(10) unsigned NOT NULL,
150 `invoiceDate` datetime NOT NULL,
151 `invoiceDetails` varchar(100) DEFAULT NULL,
152 PRIMARY KEY (`id`),
153 KEY `ordersId` (`ordersId`),
154 KEY `invoiceStatusId` (`invoiceStatusId`),
155 CONSTRAINT `invoice_ibfk_1` FOREIGN KEY (`ordersId`) REFERENCES `orders` (`id`),
156 CONSTRAINT `invoice_ibfk_2` FOREIGN KEY (`invoiceStatusId`) REFERENCES `refinvoicestatus` (`id`) ON DELETE CASCADE
157) ENGINE=InnoDB DEFAULT CHARSET=utf8;
158/*!40101 SET character_set_client = @saved_cs_client */;
159
160--
161-- Dumping data for table `invoice`
162--
163
164LOCK TABLES `invoice` WRITE;
165/*!40000 ALTER TABLE `invoice` DISABLE KEYS */;
166/*!40000 ALTER TABLE `invoice` ENABLE KEYS */;
167UNLOCK TABLES;
168
169--
170-- Table structure for table `orderdetails`
171--
172
173DROP TABLE IF EXISTS `orderdetails`;
174/*!40101 SET @saved_cs_client = @@character_set_client */;
175/*!40101 SET character_set_client = utf8 */;
176CREATE TABLE `orderdetails` (
177 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
178 `ordersId` int(10) unsigned NOT NULL,
179 `productId` int(10) unsigned NOT NULL,
180 `quantity` int(10) unsigned NOT NULL,
181 PRIMARY KEY (`id`),
182 KEY `ordersId` (`ordersId`),
183 KEY `productId` (`productId`),
184 CONSTRAINT `orderdetails_ibfk_1` FOREIGN KEY (`ordersId`) REFERENCES `orders` (`id`) ON DELETE CASCADE,
185 CONSTRAINT `orderdetails_ibfk_2` FOREIGN KEY (`productId`) REFERENCES `product` (`id`) ON DELETE CASCADE
186) ENGINE=InnoDB DEFAULT CHARSET=utf8;
187/*!40101 SET character_set_client = @saved_cs_client */;
188
189--
190-- Dumping data for table `orderdetails`
191--
192
193LOCK TABLES `orderdetails` WRITE;
194/*!40000 ALTER TABLE `orderdetails` DISABLE KEYS */;
195/*!40000 ALTER TABLE `orderdetails` ENABLE KEYS */;
196UNLOCK TABLES;
197
198--
199-- Table structure for table `orders`
200--
201
202DROP TABLE IF EXISTS `orders`;
203/*!40101 SET @saved_cs_client = @@character_set_client */;
204/*!40101 SET character_set_client = utf8 */;
205CREATE TABLE `orders` (
206 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
207 `ordersStatusId` int(10) unsigned NOT NULL,
208 `customerId` int(10) unsigned NOT NULL,
209 `orderDate` datetime NOT NULL,
210 PRIMARY KEY (`id`),
211 KEY `ordersStatusId` (`ordersStatusId`),
212 CONSTRAINT `orders_ibfk_1` FOREIGN KEY (`ordersStatusId`) REFERENCES `refordersstatus` (`id`) ON DELETE CASCADE
213) ENGINE=InnoDB DEFAULT CHARSET=utf8;
214/*!40101 SET character_set_client = @saved_cs_client */;
215
216--
217-- Dumping data for table `orders`
218--
219
220LOCK TABLES `orders` WRITE;
221/*!40000 ALTER TABLE `orders` DISABLE KEYS */;
222/*!40000 ALTER TABLE `orders` ENABLE KEYS */;
223UNLOCK TABLES;
224
225--
226-- Table structure for table `payment`
227--
228
229DROP TABLE IF EXISTS `payment`;
230/*!40101 SET @saved_cs_client = @@character_set_client */;
231/*!40101 SET character_set_client = utf8 */;
232CREATE TABLE `payment` (
233 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
234 `invoiceNumber` int(10) unsigned NOT NULL,
235 `paymentDate` datetime NOT NULL,
236 `amount` float unsigned NOT NULL,
237 `paymentStatusId` int(10) unsigned NOT NULL,
238 `modeOfPaymentId` int(10) unsigned NOT NULL,
239 PRIMARY KEY (`id`),
240 KEY `invoiceNumber` (`invoiceNumber`),
241 KEY `paymentStatusId` (`paymentStatusId`),
242 KEY `modeOfPaymentId` (`modeOfPaymentId`),
243 CONSTRAINT `payment_ibfk_1` FOREIGN KEY (`invoiceNumber`) REFERENCES `invoice` (`id`) ON DELETE CASCADE,
244 CONSTRAINT `payment_ibfk_2` FOREIGN KEY (`paymentStatusId`) REFERENCES `refpaymentstatus` (`id`) ON DELETE CASCADE,
245 CONSTRAINT `payment_ibfk_3` FOREIGN KEY (`modeOfPaymentId`) REFERENCES `refmodeofpayment` (`id`) ON DELETE CASCADE
246) ENGINE=InnoDB DEFAULT CHARSET=utf8;
247/*!40101 SET character_set_client = @saved_cs_client */;
248
249--
250-- Dumping data for table `payment`
251--
252
253LOCK TABLES `payment` WRITE;
254/*!40000 ALTER TABLE `payment` DISABLE KEYS */;
255/*!40000 ALTER TABLE `payment` ENABLE KEYS */;
256UNLOCK TABLES;
257
258--
259-- Table structure for table `product`
260--
261
262DROP TABLE IF EXISTS `product`;
263/*!40101 SET @saved_cs_client = @@character_set_client */;
264/*!40101 SET character_set_client = utf8 */;
265CREATE TABLE `product` (
266 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
267 `name` varchar(100) NOT NULL,
268 `type` varchar(50) DEFAULT NULL,
269 `companyName` varchar(50) DEFAULT NULL,
270 `note` varchar(50) DEFAULT NULL,
271 `description` varchar(100) DEFAULT NULL,
272 `stock` int(10) unsigned NOT NULL,
273 `discount` float unsigned NOT NULL DEFAULT '0',
274 `discountTime` datetime DEFAULT NULL,
275 `price` float unsigned NOT NULL,
276 `imageLink` varchar(200) NOT NULL,
277 `categoryId` int(10) unsigned NOT NULL,
278 PRIMARY KEY (`id`),
279 KEY `categoryId` (`categoryId`),
280 CONSTRAINT `product_ibfk_1` FOREIGN KEY (`categoryId`) REFERENCES `category` (`id`) ON DELETE CASCADE
281) ENGINE=InnoDB DEFAULT CHARSET=utf8;
282/*!40101 SET character_set_client = @saved_cs_client */;
283
284--
285-- Dumping data for table `product`
286--
287
288LOCK TABLES `product` WRITE;
289/*!40000 ALTER TABLE `product` DISABLE KEYS */;
290/*!40000 ALTER TABLE `product` ENABLE KEYS */;
291UNLOCK TABLES;
292
293--
294-- Table structure for table `refinvoicestatus`
295--
296
297DROP TABLE IF EXISTS `refinvoicestatus`;
298/*!40101 SET @saved_cs_client = @@character_set_client */;
299/*!40101 SET character_set_client = utf8 */;
300CREATE TABLE `refinvoicestatus` (
301 `id` int(10) unsigned NOT NULL,
302 `status` varchar(50) NOT NULL,
303 PRIMARY KEY (`id`)
304) ENGINE=InnoDB DEFAULT CHARSET=utf8;
305/*!40101 SET character_set_client = @saved_cs_client */;
306
307--
308-- Dumping data for table `refinvoicestatus`
309--
310
311LOCK TABLES `refinvoicestatus` WRITE;
312/*!40000 ALTER TABLE `refinvoicestatus` DISABLE KEYS */;
313/*!40000 ALTER TABLE `refinvoicestatus` ENABLE KEYS */;
314UNLOCK TABLES;
315
316--
317-- Table structure for table `refmodeofpayment`
318--
319
320DROP TABLE IF EXISTS `refmodeofpayment`;
321/*!40101 SET @saved_cs_client = @@character_set_client */;
322/*!40101 SET character_set_client = utf8 */;
323CREATE TABLE `refmodeofpayment` (
324 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
325 `mode` varchar(10) NOT NULL,
326 PRIMARY KEY (`id`)
327) ENGINE=InnoDB DEFAULT CHARSET=utf8;
328/*!40101 SET character_set_client = @saved_cs_client */;
329
330--
331-- Dumping data for table `refmodeofpayment`
332--
333
334LOCK TABLES `refmodeofpayment` WRITE;
335/*!40000 ALTER TABLE `refmodeofpayment` DISABLE KEYS */;
336/*!40000 ALTER TABLE `refmodeofpayment` ENABLE KEYS */;
337UNLOCK TABLES;
338
339--
340-- Table structure for table `refordersstatus`
341--
342
343DROP TABLE IF EXISTS `refordersstatus`;
344/*!40101 SET @saved_cs_client = @@character_set_client */;
345/*!40101 SET character_set_client = utf8 */;
346CREATE TABLE `refordersstatus` (
347 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
348 `status` varchar(50) NOT NULL,
349 PRIMARY KEY (`id`)
350) ENGINE=InnoDB DEFAULT CHARSET=utf8;
351/*!40101 SET character_set_client = @saved_cs_client */;
352
353--
354-- Dumping data for table `refordersstatus`
355--
356
357LOCK TABLES `refordersstatus` WRITE;
358/*!40000 ALTER TABLE `refordersstatus` DISABLE KEYS */;
359/*!40000 ALTER TABLE `refordersstatus` ENABLE KEYS */;
360UNLOCK TABLES;
361
362--
363-- Table structure for table `refpaymentstatus`
364--
365
366DROP TABLE IF EXISTS `refpaymentstatus`;
367/*!40101 SET @saved_cs_client = @@character_set_client */;
368/*!40101 SET character_set_client = utf8 */;
369CREATE TABLE `refpaymentstatus` (
370 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
371 `status` varchar(10) NOT NULL,
372 PRIMARY KEY (`id`)
373) ENGINE=InnoDB DEFAULT CHARSET=utf8;
374/*!40101 SET character_set_client = @saved_cs_client */;
375
376--
377-- Dumping data for table `refpaymentstatus`
378--
379
380LOCK TABLES `refpaymentstatus` WRITE;
381/*!40000 ALTER TABLE `refpaymentstatus` DISABLE KEYS */;
382/*!40000 ALTER TABLE `refpaymentstatus` ENABLE KEYS */;
383UNLOCK TABLES;
384
385--
386-- Table structure for table `shippingaddress`
387--
388
389DROP TABLE IF EXISTS `shippingaddress`;
390/*!40101 SET @saved_cs_client = @@character_set_client */;
391/*!40101 SET character_set_client = utf8 */;
392CREATE TABLE `shippingaddress` (
393 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
394 `houseNo` varchar(10) DEFAULT NULL,
395 `addressLine1` varchar(50) NOT NULL,
396 `addressLine2` varchar(50) NOT NULL,
397 `addressLine3` varchar(50) NOT NULL,
398 `city` varchar(50) NOT NULL,
399 `state` varchar(50) NOT NULL,
400 `zip` char(6) NOT NULL,
401 `country` varchar(50) NOT NULL,
402 `phoneNo` varchar(15) NOT NULL,
403 `customerId` int(10) unsigned NOT NULL,
404 PRIMARY KEY (`id`),
405 KEY `customerId` (`customerId`),
406 CONSTRAINT `shippingaddress_ibfk_1` FOREIGN KEY (`customerId`) REFERENCES `customer` (`id`) ON DELETE CASCADE
407) ENGINE=InnoDB DEFAULT CHARSET=utf8;
408/*!40101 SET character_set_client = @saved_cs_client */;
409
410--
411-- Dumping data for table `shippingaddress`
412--
413
414LOCK TABLES `shippingaddress` WRITE;
415/*!40000 ALTER TABLE `shippingaddress` DISABLE KEYS */;
416/*!40000 ALTER TABLE `shippingaddress` ENABLE KEYS */;
417UNLOCK TABLES;
418
419--
420-- Table structure for table `shippments`
421--
422
423DROP TABLE IF EXISTS `shippments`;
424/*!40101 SET @saved_cs_client = @@character_set_client */;
425/*!40101 SET character_set_client = utf8 */;
426CREATE TABLE `shippments` (
427 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
428 `shippingAddressId` int(10) unsigned NOT NULL,
429 `ordersId` int(10) unsigned NOT NULL,
430 `shipmentsDate` datetime NOT NULL,
431 `trackingNo` varchar(100) NOT NULL,
432 PRIMARY KEY (`id`),
433 KEY `shippingAddressId` (`shippingAddressId`),
434 KEY `ordersId` (`ordersId`),
435 CONSTRAINT `shippments_ibfk_1` FOREIGN KEY (`shippingAddressId`) REFERENCES `shippingaddress` (`id`) ON DELETE CASCADE,
436 CONSTRAINT `shippments_ibfk_2` FOREIGN KEY (`ordersId`) REFERENCES `orders` (`id`) ON DELETE CASCADE
437) ENGINE=InnoDB DEFAULT CHARSET=utf8;
438/*!40101 SET character_set_client = @saved_cs_client */;
439
440--
441-- Dumping data for table `shippments`
442--
443
444LOCK TABLES `shippments` WRITE;
445/*!40000 ALTER TABLE `shippments` DISABLE KEYS */;
446/*!40000 ALTER TABLE `shippments` ENABLE KEYS */;
447UNLOCK TABLES;
448
449--
450-- Dumping routines for database 'canbiz'
451--
452/*!50003 DROP PROCEDURE IF EXISTS `fetchFcm` */;
453/*!50003 SET @saved_cs_client = @@character_set_client */ ;
454/*!50003 SET @saved_cs_results = @@character_set_results */ ;
455/*!50003 SET @saved_col_connection = @@collation_connection */ ;
456/*!50003 SET character_set_client = cp850 */ ;
457/*!50003 SET character_set_results = cp850 */ ;
458/*!50003 SET collation_connection = cp850_general_ci */ ;
459/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
460/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
461DELIMITER ;;
462CREATE DEFINER=`root`@`localhost` PROCEDURE `fetchFcm`(N varchar(50))
463begin
464
465select fcmToken from auth where name = N;
466
467end ;;
468DELIMITER ;
469/*!50003 SET sql_mode = @saved_sql_mode */ ;
470/*!50003 SET character_set_client = @saved_cs_client */ ;
471/*!50003 SET character_set_results = @saved_cs_results */ ;
472/*!50003 SET collation_connection = @saved_col_connection */ ;
473/*!50003 DROP PROCEDURE IF EXISTS `fetchPassword` */;
474/*!50003 SET @saved_cs_client = @@character_set_client */ ;
475/*!50003 SET @saved_cs_results = @@character_set_results */ ;
476/*!50003 SET @saved_col_connection = @@collation_connection */ ;
477/*!50003 SET character_set_client = cp850 */ ;
478/*!50003 SET character_set_results = cp850 */ ;
479/*!50003 SET collation_connection = cp850_general_ci */ ;
480/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
481/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
482DELIMITER ;;
483CREATE DEFINER=`root`@`localhost` PROCEDURE `fetchPassword`(N varchar(50))
484begin
485
486select password from auth where name = N;
487
488end ;;
489DELIMITER ;
490/*!50003 SET sql_mode = @saved_sql_mode */ ;
491/*!50003 SET character_set_client = @saved_cs_client */ ;
492/*!50003 SET character_set_results = @saved_cs_results */ ;
493/*!50003 SET collation_connection = @saved_col_connection */ ;
494/*!50003 DROP PROCEDURE IF EXISTS `fetchPhoneNo` */;
495/*!50003 SET @saved_cs_client = @@character_set_client */ ;
496/*!50003 SET @saved_cs_results = @@character_set_results */ ;
497/*!50003 SET @saved_col_connection = @@collation_connection */ ;
498/*!50003 SET character_set_client = cp850 */ ;
499/*!50003 SET character_set_results = cp850 */ ;
500/*!50003 SET collation_connection = cp850_general_ci */ ;
501/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
502/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
503DELIMITER ;;
504CREATE DEFINER=`root`@`localhost` PROCEDURE `fetchPhoneNo`(N varchar(50))
505begin
506
507select phoneNo from auth where name = N;
508
509end ;;
510DELIMITER ;
511/*!50003 SET sql_mode = @saved_sql_mode */ ;
512/*!50003 SET character_set_client = @saved_cs_client */ ;
513/*!50003 SET character_set_results = @saved_cs_results */ ;
514/*!50003 SET collation_connection = @saved_col_connection */ ;
515/*!50003 DROP PROCEDURE IF EXISTS `fetchSecurityAnswer` */;
516/*!50003 SET @saved_cs_client = @@character_set_client */ ;
517/*!50003 SET @saved_cs_results = @@character_set_results */ ;
518/*!50003 SET @saved_col_connection = @@collation_connection */ ;
519/*!50003 SET character_set_client = cp850 */ ;
520/*!50003 SET character_set_results = cp850 */ ;
521/*!50003 SET collation_connection = cp850_general_ci */ ;
522/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
523/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
524DELIMITER ;;
525CREATE DEFINER=`root`@`localhost` PROCEDURE `fetchSecurityAnswer`(N varchar(50))
526begin
527
528select securityAnswer from auth where name = N;
529
530end ;;
531DELIMITER ;
532/*!50003 SET sql_mode = @saved_sql_mode */ ;
533/*!50003 SET character_set_client = @saved_cs_client */ ;
534/*!50003 SET character_set_results = @saved_cs_results */ ;
535/*!50003 SET collation_connection = @saved_col_connection */ ;
536/*!50003 DROP PROCEDURE IF EXISTS `fetchSecurityQuestion` */;
537/*!50003 SET @saved_cs_client = @@character_set_client */ ;
538/*!50003 SET @saved_cs_results = @@character_set_results */ ;
539/*!50003 SET @saved_col_connection = @@collation_connection */ ;
540/*!50003 SET character_set_client = cp850 */ ;
541/*!50003 SET character_set_results = cp850 */ ;
542/*!50003 SET collation_connection = cp850_general_ci */ ;
543/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
544/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
545DELIMITER ;;
546CREATE DEFINER=`root`@`localhost` PROCEDURE `fetchSecurityQuestion`(N varchar(50))
547begin
548
549select securityQuestion from auth where name = N;
550
551end ;;
552DELIMITER ;
553/*!50003 SET sql_mode = @saved_sql_mode */ ;
554/*!50003 SET character_set_client = @saved_cs_client */ ;
555/*!50003 SET character_set_results = @saved_cs_results */ ;
556/*!50003 SET collation_connection = @saved_col_connection */ ;
557/*!50003 DROP PROCEDURE IF EXISTS `updateEmail` */;
558/*!50003 SET @saved_cs_client = @@character_set_client */ ;
559/*!50003 SET @saved_cs_results = @@character_set_results */ ;
560/*!50003 SET @saved_col_connection = @@collation_connection */ ;
561/*!50003 SET character_set_client = cp850 */ ;
562/*!50003 SET character_set_results = cp850 */ ;
563/*!50003 SET collation_connection = cp850_general_ci */ ;
564/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
565/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
566DELIMITER ;;
567CREATE DEFINER=`root`@`localhost` PROCEDURE `updateEmail`(E varchar(50), N varchar(50))
568begin
569
570update auth set email = E where name = N;
571
572end ;;
573DELIMITER ;
574/*!50003 SET sql_mode = @saved_sql_mode */ ;
575/*!50003 SET character_set_client = @saved_cs_client */ ;
576/*!50003 SET character_set_results = @saved_cs_results */ ;
577/*!50003 SET collation_connection = @saved_col_connection */ ;
578/*!50003 DROP PROCEDURE IF EXISTS `updateFcm` */;
579/*!50003 SET @saved_cs_client = @@character_set_client */ ;
580/*!50003 SET @saved_cs_results = @@character_set_results */ ;
581/*!50003 SET @saved_col_connection = @@collation_connection */ ;
582/*!50003 SET character_set_client = cp850 */ ;
583/*!50003 SET character_set_results = cp850 */ ;
584/*!50003 SET collation_connection = cp850_general_ci */ ;
585/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
586/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
587DELIMITER ;;
588CREATE DEFINER=`root`@`localhost` PROCEDURE `updateFcm`(F varchar(100))
589begin
590
591update auth set fcmToken = F;
592
593end ;;
594DELIMITER ;
595/*!50003 SET sql_mode = @saved_sql_mode */ ;
596/*!50003 SET character_set_client = @saved_cs_client */ ;
597/*!50003 SET character_set_results = @saved_cs_results */ ;
598/*!50003 SET collation_connection = @saved_col_connection */ ;
599/*!50003 DROP PROCEDURE IF EXISTS `updateName` */;
600/*!50003 SET @saved_cs_client = @@character_set_client */ ;
601/*!50003 SET @saved_cs_results = @@character_set_results */ ;
602/*!50003 SET @saved_col_connection = @@collation_connection */ ;
603/*!50003 SET character_set_client = cp850 */ ;
604/*!50003 SET character_set_results = cp850 */ ;
605/*!50003 SET collation_connection = cp850_general_ci */ ;
606/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
607/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
608DELIMITER ;;
609CREATE DEFINER=`root`@`localhost` PROCEDURE `updateName`(NN varchar(50), N varchar(50))
610begin
611
612update auth set name = NN where name = N;
613
614end ;;
615DELIMITER ;
616/*!50003 SET sql_mode = @saved_sql_mode */ ;
617/*!50003 SET character_set_client = @saved_cs_client */ ;
618/*!50003 SET character_set_results = @saved_cs_results */ ;
619/*!50003 SET collation_connection = @saved_col_connection */ ;
620/*!50003 DROP PROCEDURE IF EXISTS `updatePassword` */;
621/*!50003 SET @saved_cs_client = @@character_set_client */ ;
622/*!50003 SET @saved_cs_results = @@character_set_results */ ;
623/*!50003 SET @saved_col_connection = @@collation_connection */ ;
624/*!50003 SET character_set_client = cp850 */ ;
625/*!50003 SET character_set_results = cp850 */ ;
626/*!50003 SET collation_connection = cp850_general_ci */ ;
627/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
628/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
629DELIMITER ;;
630CREATE DEFINER=`root`@`localhost` PROCEDURE `updatePassword`(P varchar(100), N varchar(50))
631begin
632
633update auth set password = P where name = N;
634
635end ;;
636DELIMITER ;
637/*!50003 SET sql_mode = @saved_sql_mode */ ;
638/*!50003 SET character_set_client = @saved_cs_client */ ;
639/*!50003 SET character_set_results = @saved_cs_results */ ;
640/*!50003 SET collation_connection = @saved_col_connection */ ;
641/*!50003 DROP PROCEDURE IF EXISTS `updatePhone` */;
642/*!50003 SET @saved_cs_client = @@character_set_client */ ;
643/*!50003 SET @saved_cs_results = @@character_set_results */ ;
644/*!50003 SET @saved_col_connection = @@collation_connection */ ;
645/*!50003 SET character_set_client = cp850 */ ;
646/*!50003 SET character_set_results = cp850 */ ;
647/*!50003 SET collation_connection = cp850_general_ci */ ;
648/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
649/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
650DELIMITER ;;
651CREATE DEFINER=`root`@`localhost` PROCEDURE `updatePhone`(P varchar(15), N varchar(50))
652begin
653
654update auth set phoneNo = P where name = N;
655
656end ;;
657DELIMITER ;
658/*!50003 SET sql_mode = @saved_sql_mode */ ;
659/*!50003 SET character_set_client = @saved_cs_client */ ;
660/*!50003 SET character_set_results = @saved_cs_results */ ;
661/*!50003 SET collation_connection = @saved_col_connection */ ;
662/*!50003 DROP PROCEDURE IF EXISTS `updateSecurityAnswer` */;
663/*!50003 SET @saved_cs_client = @@character_set_client */ ;
664/*!50003 SET @saved_cs_results = @@character_set_results */ ;
665/*!50003 SET @saved_col_connection = @@collation_connection */ ;
666/*!50003 SET character_set_client = cp850 */ ;
667/*!50003 SET character_set_results = cp850 */ ;
668/*!50003 SET collation_connection = cp850_general_ci */ ;
669/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
670/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
671DELIMITER ;;
672CREATE DEFINER=`root`@`localhost` PROCEDURE `updateSecurityAnswer`(A varchar(50), N varchar(50))
673begin
674
675update auth set securityAnswer= A where name = N;
676
677end ;;
678DELIMITER ;
679/*!50003 SET sql_mode = @saved_sql_mode */ ;
680/*!50003 SET character_set_client = @saved_cs_client */ ;
681/*!50003 SET character_set_results = @saved_cs_results */ ;
682/*!50003 SET collation_connection = @saved_col_connection */ ;
683/*!50003 DROP PROCEDURE IF EXISTS `updateSecurityQuestion` */;
684/*!50003 SET @saved_cs_client = @@character_set_client */ ;
685/*!50003 SET @saved_cs_results = @@character_set_results */ ;
686/*!50003 SET @saved_col_connection = @@collation_connection */ ;
687/*!50003 SET character_set_client = cp850 */ ;
688/*!50003 SET character_set_results = cp850 */ ;
689/*!50003 SET collation_connection = cp850_general_ci */ ;
690/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
691/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
692DELIMITER ;;
693CREATE DEFINER=`root`@`localhost` PROCEDURE `updateSecurityQuestion`(Q varchar(100), N varchar(50))
694begin
695
696update auth set securityQuestion = Q where name = N;
697
698end ;;
699DELIMITER ;
700/*!50003 SET sql_mode = @saved_sql_mode */ ;
701/*!50003 SET character_set_client = @saved_cs_client */ ;
702/*!50003 SET character_set_results = @saved_cs_results */ ;
703/*!50003 SET collation_connection = @saved_col_connection */ ;
704/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
705
706/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
707/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
708/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
709/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
710/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
711/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
712/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
713
714-- Dump completed on 2018-05-15 22:35:18