· 7 years ago · Jan 25, 2019, 10:28 PM
1-- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
2--
3-- Host: localhost Database: lookout
4-- ------------------------------------------------------
5-- Server version 8.0.13
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 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 `advisors`
20--
21
22DROP TABLE IF EXISTS `advisors`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24 SET character_set_client = utf8mb4 ;
25CREATE TABLE `advisors` (
26 `advisor_id` int(11) NOT NULL,
27 `student_id` int(11) NOT NULL,
28 PRIMARY KEY (`advisor_id`,`student_id`),
29 KEY `advisors_users_user_id_fk_2` (`student_id`),
30 CONSTRAINT `advisors_users_user_id_fk` FOREIGN KEY (`advisor_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
31 CONSTRAINT `advisors_users_user_id_fk_2` FOREIGN KEY (`student_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
32) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
33/*!40101 SET character_set_client = @saved_cs_client */;
34
35--
36-- Dumping data for table `advisors`
37--
38
39LOCK TABLES `advisors` WRITE;
40/*!40000 ALTER TABLE `advisors` DISABLE KEYS */;
41/*!40000 ALTER TABLE `advisors` ENABLE KEYS */;
42UNLOCK TABLES;
43
44--
45-- Table structure for table `conferences`
46--
47
48DROP TABLE IF EXISTS `conferences`;
49/*!40101 SET @saved_cs_client = @@character_set_client */;
50 SET character_set_client = utf8mb4 ;
51CREATE TABLE `conferences` (
52 `conference_id` int(11) NOT NULL AUTO_INCREMENT,
53 `name` varchar(100) NOT NULL,
54 `start_date` date NOT NULL,
55 `end_date` date NOT NULL,
56 PRIMARY KEY (`conference_id`)
57) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
58/*!40101 SET character_set_client = @saved_cs_client */;
59
60--
61-- Dumping data for table `conferences`
62--
63
64LOCK TABLES `conferences` WRITE;
65/*!40000 ALTER TABLE `conferences` DISABLE KEYS */;
66INSERT INTO `conferences` VALUES (2,'Minnesota','2019-01-27','2019-01-31'),(4,'Florida','2018-12-30','2018-12-30'),(5,'Ohio','2018-12-30','2018-12-30');
67/*!40000 ALTER TABLE `conferences` ENABLE KEYS */;
68UNLOCK TABLES;
69
70--
71-- Table structure for table `events`
72--
73
74DROP TABLE IF EXISTS `events`;
75/*!40101 SET @saved_cs_client = @@character_set_client */;
76 SET character_set_client = utf8mb4 ;
77CREATE TABLE `events` (
78 `event_id` int(11) NOT NULL AUTO_INCREMENT,
79 `name` varchar(50) NOT NULL,
80 `description` varchar(200) NOT NULL,
81 `start_time` datetime NOT NULL,
82 `end_time` datetime NOT NULL,
83 `conference_id` int(11) NOT NULL,
84 PRIMARY KEY (`event_id`),
85 KEY `events_conferences_conference_id_fk` (`conference_id`),
86 CONSTRAINT `events_conferences_conference_id_fk` FOREIGN KEY (`conference_id`) REFERENCES `conferences` (`conference_id`) ON DELETE CASCADE ON UPDATE CASCADE
87) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
88/*!40101 SET character_set_client = @saved_cs_client */;
89
90--
91-- Dumping data for table `events`
92--
93
94LOCK TABLES `events` WRITE;
95/*!40000 ALTER TABLE `events` DISABLE KEYS */;
96INSERT INTO `events` VALUES (4,'Java','Programming','2018-12-30 00:00:00','2018-12-30 00:00:00',2),(5,'Kacper','hi','0004-12-28 00:00:00','0004-12-28 00:00:00',2),(6,'wafejk','lkjawef','0004-12-28 00:00:00','0004-12-28 00:00:00',2),(7,'Test','lwkaefj','2005-05-00 00:00:00','2018-06-00 00:00:00',2),(8,'awefkaw','lawjefaw','2017-01-00 00:00:00','2017-01-00 00:00:00',2),(9,'awfkjwelafjlwke','klawjefkljafwlke','2017-05-00 00:00:00','2018-06-00 00:00:00',2),(10,'awlekfjwalk','jpawiejaiw','0004-12-28 17:05:00','0005-12-27 18:06:00',2);
97/*!40000 ALTER TABLE `events` ENABLE KEYS */;
98UNLOCK TABLES;
99
100--
101-- Table structure for table `userevents`
102--
103
104DROP TABLE IF EXISTS `userevents`;
105/*!40101 SET @saved_cs_client = @@character_set_client */;
106 SET character_set_client = utf8mb4 ;
107CREATE TABLE `userevents` (
108 `event_id` int(11) NOT NULL,
109 `user_id` int(11) NOT NULL,
110 PRIMARY KEY (`event_id`,`user_id`),
111 KEY `userevents_users_user_id_fk` (`user_id`),
112 CONSTRAINT `userevents_events_event_id_fk` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE,
113 CONSTRAINT `userevents_users_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
114) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
115/*!40101 SET character_set_client = @saved_cs_client */;
116
117--
118-- Dumping data for table `userevents`
119--
120
121LOCK TABLES `userevents` WRITE;
122/*!40000 ALTER TABLE `userevents` DISABLE KEYS */;
123/*!40000 ALTER TABLE `userevents` ENABLE KEYS */;
124UNLOCK TABLES;
125
126--
127-- Table structure for table `users`
128--
129
130DROP TABLE IF EXISTS `users`;
131/*!40101 SET @saved_cs_client = @@character_set_client */;
132 SET character_set_client = utf8mb4 ;
133CREATE TABLE `users` (
134 `user_id` int(11) NOT NULL AUTO_INCREMENT,
135 `username` varchar(50) DEFAULT NULL,
136 `f_name` varchar(50) DEFAULT NULL,
137 `l_name` varchar(50) DEFAULT NULL,
138 `email` varchar(100) DEFAULT NULL,
139 `password` varchar(100) DEFAULT NULL,
140 `is_advisor` tinyint(1) NOT NULL DEFAULT '0',
141 `is_admin` tinyint(1) NOT NULL DEFAULT '0',
142 `conference_id` int(11) DEFAULT NULL,
143 PRIMARY KEY (`user_id`),
144 KEY `users_conferences_conference_id_fk` (`conference_id`),
145 CONSTRAINT `users_conferences_conference_id_fk` FOREIGN KEY (`conference_id`) REFERENCES `conferences` (`conference_id`)
146) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=latin1;
147/*!40101 SET character_set_client = @saved_cs_client */;
148
149--
150-- Dumping data for table `users`
151--
152
153LOCK TABLES `users` WRITE;
154/*!40000 ALTER TABLE `users` DISABLE KEYS */;
155INSERT INTO `users` VALUES (22,'matt','Matt','Moser','matt@moseracctg.com','cGFzc3dvcmQ=',0,0,2),(26,'testt','test','test','test@gmail.com','cGFzc3dvcmQ=',0,0,NULL),(27,'awfeawf','lakjwfe','ljkawfe','jkalwe@gmail.com','bGthandlZg==',1,0,NULL);
156/*!40000 ALTER TABLE `users` ENABLE KEYS */;
157UNLOCK TABLES;
158/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
159
160/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
161/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
162/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
163/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
164/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
165/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
166/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
167
168-- Dump completed on 2019-01-25 16:24:29