· 7 years ago · Nov 30, 2018, 03:04 PM
1-- MySQL dump 10.16 Distrib 10.1.35-MariaDB, for Win32 (AMD64)
2--
3-- Host: localhost Database: salon
4-- ------------------------------------------------------
5-- Server version 10.1.35-MariaDB
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 `charges`
20--
21
22DROP TABLE IF EXISTS `charges`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `charges` (
26 `id` int(9) NOT NULL AUTO_INCREMENT,
27 `cid` int(9) DEFAULT NULL,
28 `sid` int(9) DEFAULT NULL,
29 `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
30 PRIMARY KEY (`id`)
31) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
32/*!40101 SET character_set_client = @saved_cs_client */;
33
34--
35-- Dumping data for table `charges`
36--
37
38LOCK TABLES `charges` WRITE;
39/*!40000 ALTER TABLE `charges` DISABLE KEYS */;
40INSERT INTO `charges` VALUES (2,1,2,'2018-11-28 13:44:39'),(3,1,5,'2018-11-28 13:45:24');
41/*!40000 ALTER TABLE `charges` ENABLE KEYS */;
42UNLOCK TABLES;
43
44--
45-- Table structure for table `customers`
46--
47
48DROP TABLE IF EXISTS `customers`;
49/*!40101 SET @saved_cs_client = @@character_set_client */;
50/*!40101 SET character_set_client = utf8 */;
51CREATE TABLE `customers` (
52 `id` int(9) NOT NULL AUTO_INCREMENT,
53 `first_name` varchar(32) DEFAULT NULL,
54 `last_name` varchar(32) DEFAULT NULL,
55 `address` text,
56 `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
57 PRIMARY KEY (`id`)
58) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
59/*!40101 SET character_set_client = @saved_cs_client */;
60
61--
62-- Dumping data for table `customers`
63--
64
65LOCK TABLES `customers` WRITE;
66/*!40000 ALTER TABLE `customers` DISABLE KEYS */;
67INSERT INTO `customers` VALUES (1,'Andrew','Simons','Nakuru Central, 551\r\n','2018-11-28 10:25:01'),(2,'Jim','Carrey','112 Langa Langa','2018-11-28 10:28:49');
68/*!40000 ALTER TABLE `customers` ENABLE KEYS */;
69UNLOCK TABLES;
70
71--
72-- Table structure for table `groups`
73--
74
75DROP TABLE IF EXISTS `groups`;
76/*!40101 SET @saved_cs_client = @@character_set_client */;
77/*!40101 SET character_set_client = utf8 */;
78CREATE TABLE `groups` (
79 `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
80 `name` varchar(20) NOT NULL,
81 `description` varchar(100) NOT NULL,
82 PRIMARY KEY (`id`)
83) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
84/*!40101 SET character_set_client = @saved_cs_client */;
85
86--
87-- Dumping data for table `groups`
88--
89
90LOCK TABLES `groups` WRITE;
91/*!40000 ALTER TABLE `groups` DISABLE KEYS */;
92INSERT INTO `groups` VALUES (1,'admin','Administrator'),(2,'members','General User');
93/*!40000 ALTER TABLE `groups` ENABLE KEYS */;
94UNLOCK TABLES;
95
96--
97-- Table structure for table `login_attempts`
98--
99
100DROP TABLE IF EXISTS `login_attempts`;
101/*!40101 SET @saved_cs_client = @@character_set_client */;
102/*!40101 SET character_set_client = utf8 */;
103CREATE TABLE `login_attempts` (
104 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
105 `ip_address` varchar(45) NOT NULL,
106 `login` varchar(100) NOT NULL,
107 `time` int(11) unsigned DEFAULT NULL,
108 PRIMARY KEY (`id`)
109) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
110/*!40101 SET character_set_client = @saved_cs_client */;
111
112--
113-- Dumping data for table `login_attempts`
114--
115
116LOCK TABLES `login_attempts` WRITE;
117/*!40000 ALTER TABLE `login_attempts` DISABLE KEYS */;
118INSERT INTO `login_attempts` VALUES (3,'::1','12345678',1543576003),(4,'::1','12345678',1543576007);
119/*!40000 ALTER TABLE `login_attempts` ENABLE KEYS */;
120UNLOCK TABLES;
121
122--
123-- Table structure for table `products`
124--
125
126DROP TABLE IF EXISTS `products`;
127/*!40101 SET @saved_cs_client = @@character_set_client */;
128/*!40101 SET character_set_client = utf8 */;
129CREATE TABLE `products` (
130 `id` int(9) NOT NULL AUTO_INCREMENT,
131 `product_name` varchar(32) DEFAULT NULL,
132 `price` float(10,2) DEFAULT NULL,
133 `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
134 PRIMARY KEY (`id`)
135) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;
136/*!40101 SET character_set_client = @saved_cs_client */;
137
138--
139-- Dumping data for table `products`
140--
141
142LOCK TABLES `products` WRITE;
143/*!40000 ALTER TABLE `products` DISABLE KEYS */;
144INSERT INTO `products` VALUES (2,'Moroccanoil Curl Defining Cream',700.00,'2018-11-28 08:38:21'),(4,'Kevin Murphy Blonde Angel Wash',100.00,'2018-11-28 08:38:21'),(5,'Volumizing Conditioner',50.00,'2018-11-28 08:39:13'),(11,'TCB Lotion',200.00,'2018-11-28 10:29:05'),(13,'Briogeo Scalp Revival Treatment',NULL,'2018-11-28 10:53:28');
145/*!40000 ALTER TABLE `products` ENABLE KEYS */;
146UNLOCK TABLES;
147
148--
149-- Table structure for table `salaries`
150--
151
152DROP TABLE IF EXISTS `salaries`;
153/*!40101 SET @saved_cs_client = @@character_set_client */;
154/*!40101 SET character_set_client = utf8 */;
155CREATE TABLE `salaries` (
156 `id` int(9) NOT NULL AUTO_INCREMENT,
157 `employee` int(9) DEFAULT NULL,
158 `amount` float(10,2) DEFAULT NULL,
159 PRIMARY KEY (`id`)
160) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
161/*!40101 SET character_set_client = @saved_cs_client */;
162
163--
164-- Dumping data for table `salaries`
165--
166
167LOCK TABLES `salaries` WRITE;
168/*!40000 ALTER TABLE `salaries` DISABLE KEYS */;
169INSERT INTO `salaries` VALUES (1,1,12500.00),(2,7,0.00),(3,6,390.00);
170/*!40000 ALTER TABLE `salaries` ENABLE KEYS */;
171UNLOCK TABLES;
172
173--
174-- Table structure for table `services`
175--
176
177DROP TABLE IF EXISTS `services`;
178/*!40101 SET @saved_cs_client = @@character_set_client */;
179/*!40101 SET character_set_client = utf8 */;
180CREATE TABLE `services` (
181 `id` int(11) NOT NULL AUTO_INCREMENT,
182 `service_name` varchar(32) DEFAULT NULL,
183 `unit_cost` float(10,2) DEFAULT NULL,
184 PRIMARY KEY (`id`)
185) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
186/*!40101 SET character_set_client = @saved_cs_client */;
187
188--
189-- Dumping data for table `services`
190--
191
192LOCK TABLES `services` WRITE;
193/*!40000 ALTER TABLE `services` DISABLE KEYS */;
194INSERT INTO `services` VALUES (1,'Shampoo & hair cut',250.00),(2,'Wash & blow dry',1500.00),(4,'Threading',950.00),(5,'Gel manicure',390.00);
195/*!40000 ALTER TABLE `services` ENABLE KEYS */;
196UNLOCK TABLES;
197
198--
199-- Table structure for table `users`
200--
201
202DROP TABLE IF EXISTS `users`;
203/*!40101 SET @saved_cs_client = @@character_set_client */;
204/*!40101 SET character_set_client = utf8 */;
205CREATE TABLE `users` (
206 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
207 `ip_address` varchar(45) NOT NULL,
208 `username` varchar(100) DEFAULT NULL,
209 `password` varchar(255) NOT NULL,
210 `salt` varchar(255) DEFAULT NULL,
211 `email` varchar(254) NOT NULL,
212 `activation_code` varchar(40) DEFAULT NULL,
213 `forgotten_password_code` varchar(40) DEFAULT NULL,
214 `forgotten_password_time` int(11) unsigned DEFAULT NULL,
215 `remember_code` varchar(40) DEFAULT NULL,
216 `created_on` int(11) unsigned NOT NULL,
217 `last_login` int(11) unsigned DEFAULT NULL,
218 `active` tinyint(1) unsigned DEFAULT NULL,
219 `first_name` varchar(50) DEFAULT NULL,
220 `last_name` varchar(50) DEFAULT NULL,
221 `company` varchar(100) DEFAULT NULL,
222 `phone` varchar(20) DEFAULT NULL,
223 `father` int(9) DEFAULT NULL,
224 PRIMARY KEY (`id`)
225) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
226/*!40101 SET character_set_client = @saved_cs_client */;
227
228--
229-- Dumping data for table `users`
230--
231
232LOCK TABLES `users` WRITE;
233/*!40000 ALTER TABLE `users` DISABLE KEYS */;
234INSERT INTO `users` VALUES (1,'127.0.0.1','administrator','$2a$07$SeBknntpZror9uyftVopmu61qg0ms8Qv1yV6FG.kQOSM.9QhmTo36','','admin@admin.com','',NULL,NULL,NULL,1268889823,1543571737,1,'Admin','istrator','ADMIN','0',NULL),(6,'','mat@sky.com','$2y$10$a0IRCHsWESLKD2KKZQI7QOskZ6NkOaTPei0ofFmqpseZrIjESnriG',NULL,'mat@sky.com',NULL,NULL,NULL,NULL,0,1541974290,1,'ben','carson','Lighthouse','4678790',1),(7,'','sam@j.com','$2y$10$7UDWVVnlHT9RY3zlUpQ.WuMCoby47Z3.xhjATDLqnmzqQQxdRDcs2',NULL,'sam@j.com',NULL,NULL,NULL,NULL,0,1541974353,1,'sam','carson','Lighthouse','4678790',6),(8,'','fathi@gmail.com','$2y$10$P/ssTNOGKb68ke2WO86kNe.451wJyl8.oOolHo1stony8F7pwlCAK',NULL,'fathi@gmail.com',NULL,NULL,NULL,NULL,0,NULL,1,'fauth','amina','tech','12345678',0);
235/*!40000 ALTER TABLE `users` ENABLE KEYS */;
236UNLOCK TABLES;
237
238--
239-- Table structure for table `users2`
240--
241
242DROP TABLE IF EXISTS `users2`;
243/*!40101 SET @saved_cs_client = @@character_set_client */;
244/*!40101 SET character_set_client = utf8 */;
245CREATE TABLE `users2` (
246 `id` int(9) NOT NULL AUTO_INCREMENT,
247 `username` varchar(32) DEFAULT NULL,
248 `password` varchar(64) DEFAULT NULL,
249 `child` varchar(32) DEFAULT NULL,
250 `father` varchar(32) DEFAULT NULL,
251 `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
252 PRIMARY KEY (`id`)
253) ENGINE=InnoDB DEFAULT CHARSET=latin1;
254/*!40101 SET character_set_client = @saved_cs_client */;
255
256--
257-- Dumping data for table `users2`
258--
259
260LOCK TABLES `users2` WRITE;
261/*!40000 ALTER TABLE `users2` DISABLE KEYS */;
262/*!40000 ALTER TABLE `users2` ENABLE KEYS */;
263UNLOCK TABLES;
264
265--
266-- Table structure for table `users_groups`
267--
268
269DROP TABLE IF EXISTS `users_groups`;
270/*!40101 SET @saved_cs_client = @@character_set_client */;
271/*!40101 SET character_set_client = utf8 */;
272CREATE TABLE `users_groups` (
273 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
274 `user_id` int(11) unsigned NOT NULL,
275 `group_id` mediumint(8) unsigned NOT NULL,
276 PRIMARY KEY (`id`),
277 UNIQUE KEY `uc_users_groups` (`user_id`,`group_id`),
278 KEY `fk_users_groups_users1_idx` (`user_id`),
279 KEY `fk_users_groups_groups1_idx` (`group_id`),
280 CONSTRAINT `fk_users_groups_groups1` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
281 CONSTRAINT `fk_users_groups_users1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
282) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
283/*!40101 SET character_set_client = @saved_cs_client */;
284
285--
286-- Dumping data for table `users_groups`
287--
288
289LOCK TABLES `users_groups` WRITE;
290/*!40000 ALTER TABLE `users_groups` DISABLE KEYS */;
291INSERT INTO `users_groups` VALUES (1,1,1),(2,1,2);
292/*!40000 ALTER TABLE `users_groups` ENABLE KEYS */;
293UNLOCK TABLES;
294/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
295
296/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
297/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
298/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
299/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
300/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
301/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
302/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
303
304-- Dump completed on 2018-11-30 14:07:55