· 8 years ago · Feb 09, 2018, 01:20 AM
1-- MySQL dump 10.13 Distrib 5.7.8-rc, for Win64 (x86_64)
2--
3-- Host: localhost Database: ReviewCrew
4-- ------------------------------------------------------
5-- Server version 5.7.8-rc-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 `answers`
20--
21
22DROP TABLE IF EXISTS `answers`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `answers` (
26 `id` int(11) NOT NULL AUTO_INCREMENT,
27 `question_id` int(11) DEFAULT NULL,
28 `answer_value` varchar(2000) DEFAULT NULL,
29 `correct_yn` varchar(1) DEFAULT NULL,
30 PRIMARY KEY (`id`)
31) ENGINE=InnoDB DEFAULT CHARSET=utf8;
32/*!40101 SET character_set_client = @saved_cs_client */;
33
34--
35-- Dumping data for table `answers`
36--
37
38LOCK TABLES `answers` WRITE;
39/*!40000 ALTER TABLE `answers` DISABLE KEYS */;
40/*!40000 ALTER TABLE `answers` ENABLE KEYS */;
41UNLOCK TABLES;
42
43--
44-- Table structure for table `questions`
45--
46
47DROP TABLE IF EXISTS `questions`;
48/*!40101 SET @saved_cs_client = @@character_set_client */;
49/*!40101 SET character_set_client = utf8 */;
50CREATE TABLE `questions` (
51 `id` int(11) NOT NULL AUTO_INCREMENT,
52 `studyset_id` int(11) DEFAULT NULL,
53 `question_text` varchar(200) DEFAULT NULL,
54 PRIMARY KEY (`id`)
55) ENGINE=InnoDB DEFAULT CHARSET=utf8;
56/*!40101 SET character_set_client = @saved_cs_client */;
57
58--
59-- Dumping data for table `questions`
60--
61
62LOCK TABLES `questions` WRITE;
63/*!40000 ALTER TABLE `questions` DISABLE KEYS */;
64/*!40000 ALTER TABLE `questions` ENABLE KEYS */;
65UNLOCK TABLES;
66
67--
68-- Table structure for table `scores`
69--
70
71DROP TABLE IF EXISTS `scores`;
72/*!40101 SET @saved_cs_client = @@character_set_client */;
73/*!40101 SET character_set_client = utf8 */;
74CREATE TABLE `scores` (
75 `id` int(11) NOT NULL AUTO_INCREMENT,
76 `user_id` int(11) DEFAULT NULL,
77 `studyset_id` int(11) DEFAULT NULL,
78 `score` int(11) DEFAULT NULL,
79 PRIMARY KEY (`id`)
80) ENGINE=InnoDB DEFAULT CHARSET=utf8;
81/*!40101 SET character_set_client = @saved_cs_client */;
82
83--
84-- Dumping data for table `scores`
85--
86
87LOCK TABLES `scores` WRITE;
88/*!40000 ALTER TABLE `scores` DISABLE KEYS */;
89/*!40000 ALTER TABLE `scores` ENABLE KEYS */;
90UNLOCK TABLES;
91
92--
93-- Table structure for table `studysets`
94--
95
96DROP TABLE IF EXISTS `studysets`;
97/*!40101 SET @saved_cs_client = @@character_set_client */;
98/*!40101 SET character_set_client = utf8 */;
99CREATE TABLE `studysets` (
100 `id` int(11) NOT NULL AUTO_INCREMENT,
101 `studyset_name` varchar(200) DEFAULT NULL,
102 PRIMARY KEY (`id`)
103) ENGINE=InnoDB DEFAULT CHARSET=utf8;
104/*!40101 SET character_set_client = @saved_cs_client */;
105
106--
107-- Dumping data for table `studysets`
108--
109
110LOCK TABLES `studysets` WRITE;
111/*!40000 ALTER TABLE `studysets` DISABLE KEYS */;
112/*!40000 ALTER TABLE `studysets` ENABLE KEYS */;
113UNLOCK TABLES;
114
115--
116-- Table structure for table `user_roles`
117--
118
119DROP TABLE IF EXISTS `user_roles`;
120/*!40101 SET @saved_cs_client = @@character_set_client */;
121/*!40101 SET character_set_client = utf8 */;
122CREATE TABLE `user_roles` (
123 `username` varchar(255) NOT NULL,
124 `role_name` varchar(255) DEFAULT NULL
125) ENGINE=InnoDB DEFAULT CHARSET=utf8;
126/*!40101 SET character_set_client = @saved_cs_client */;
127
128--
129-- Dumping data for table `user_roles`
130--
131
132LOCK TABLES `user_roles` WRITE;
133/*!40000 ALTER TABLE `user_roles` DISABLE KEYS */;
134INSERT INTO `user_roles` VALUES ('matt','admin');
135/*!40000 ALTER TABLE `user_roles` ENABLE KEYS */;
136UNLOCK TABLES;
137
138--
139-- Table structure for table `users`
140--
141
142DROP TABLE IF EXISTS `users`;
143/*!40101 SET @saved_cs_client = @@character_set_client */;
144/*!40101 SET character_set_client = utf8 */;
145CREATE TABLE `users` (
146 `id` int(11) NOT NULL AUTO_INCREMENT,
147 `email_address` varchar(50) NOT NULL,
148 `username` varchar(255) NOT NULL,
149 `password` varchar(255) NOT NULL,
150 PRIMARY KEY (`id`)
151) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
152/*!40101 SET character_set_client = @saved_cs_client */;
153
154--
155-- Dumping data for table `users`
156--
157
158LOCK TABLES `users` WRITE;
159/*!40000 ALTER TABLE `users` DISABLE KEYS */;
160INSERT INTO `users` VALUES (1,'matt@moseracctg.com','matt','098f6bcd4621d373cade4e832627b4f6');
161/*!40000 ALTER TABLE `users` ENABLE KEYS */;
162UNLOCK TABLES;
163/*!50003 SET @saved_cs_client = @@character_set_client */ ;
164/*!50003 SET @saved_cs_results = @@character_set_results */ ;
165/*!50003 SET @saved_col_connection = @@collation_connection */ ;
166/*!50003 SET character_set_client = utf8 */ ;
167/*!50003 SET character_set_results = utf8 */ ;
168/*!50003 SET collation_connection = utf8_general_ci */ ;
169/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
170/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
171DELIMITER ;;
172/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 trigger roles_after_ins_trig after insert on users
173 for each row
174 begin
175 insert into user_roles (username, role_name) values (new.username, "default");
176 end */;;
177DELIMITER ;
178/*!50003 SET sql_mode = @saved_sql_mode */ ;
179/*!50003 SET character_set_client = @saved_cs_client */ ;
180/*!50003 SET character_set_results = @saved_cs_results */ ;
181/*!50003 SET collation_connection = @saved_col_connection */ ;
182/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
183
184/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
185/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
186/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
187/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
188/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
189/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
190/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
191
192-- Dump completed on 2018-02-08 16:23:12