SHARE
TWEET

Untitled

a guest Jan 25th, 2019 119 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  
  22. DROP TABLE IF EXISTS `advisors`;
  23. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  24.  SET character_set_client = utf8mb4 ;
  25. CREATE 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.  
  39. LOCK TABLES `advisors` WRITE;
  40. /*!40000 ALTER TABLE `advisors` DISABLE KEYS */;
  41. INSERT INTO `advisors` VALUES (1,5),(2,6),(3,7);
  42. /*!40000 ALTER TABLE `advisors` ENABLE KEYS */;
  43. UNLOCK TABLES;
  44.  
  45. --
  46. -- Table structure for table `conferences`
  47. --
  48.  
  49. DROP TABLE IF EXISTS `conferences`;
  50. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  51.  SET character_set_client = utf8mb4 ;
  52. CREATE TABLE `conferences` (
  53.   `conference_id` int(11) NOT NULL AUTO_INCREMENT,
  54.   `name` varchar(100) NOT NULL,
  55.   `start_date` date NOT NULL,
  56.   `end_date` date NOT NULL,
  57.   PRIMARY KEY (`conference_id`)
  58. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
  59. /*!40101 SET character_set_client = @saved_cs_client */;
  60.  
  61. --
  62. -- Dumping data for table `conferences`
  63. --
  64.  
  65. LOCK TABLES `conferences` WRITE;
  66. /*!40000 ALTER TABLE `conferences` DISABLE KEYS */;
  67. INSERT INTO `conferences` VALUES (1,'Minnesota','2019-01-01','2019-01-05'),(2,'Ohio','2019-02-01','2019-02-05'),(3,'Alaska','2019-03-01','2019-03-05');
  68. /*!40000 ALTER TABLE `conferences` ENABLE KEYS */;
  69. UNLOCK TABLES;
  70.  
  71. --
  72. -- Table structure for table `events`
  73. --
  74.  
  75. DROP TABLE IF EXISTS `events`;
  76. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  77.  SET character_set_client = utf8mb4 ;
  78. CREATE TABLE `events` (
  79.   `event_id` int(11) NOT NULL AUTO_INCREMENT,
  80.   `name` varchar(50) NOT NULL,
  81.   `description` varchar(200) NOT NULL,
  82.   `start_time` datetime NOT NULL,
  83.   `end_time` datetime NOT NULL,
  84.   `conference_id` int(11) NOT NULL,
  85.   PRIMARY KEY (`event_id`),
  86.   KEY `events_conferences_conference_id_fk` (`conference_id`),
  87.   CONSTRAINT `events_conferences_conference_id_fk` FOREIGN KEY (`conference_id`) REFERENCES `conferences` (`conference_id`) ON DELETE CASCADE ON UPDATE CASCADE
  88. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
  89. /*!40101 SET character_set_client = @saved_cs_client */;
  90.  
  91. --
  92. -- Dumping data for table `events`
  93. --
  94.  
  95. LOCK TABLES `events` WRITE;
  96. /*!40000 ALTER TABLE `events` DISABLE KEYS */;
  97. INSERT INTO `events` VALUES (1,'Java','Computer Programming','2019-01-01 02:30:00','2019-01-01 03:30:00',1),(2,'Web Application','Develop a website.','2019-01-03 05:30:00','2019-01-03 06:00:00',1),(3,'HR Solutions','HR solutions development','2019-02-02 10:00:00','2019-02-02 11:00:00',2),(4,'Medical Team','Medical solutions team event.','2019-02-04 17:30:00','2019-02-04 18:30:00',2),(5,'SQL Concepts','SQL open event test.','2019-03-03 09:00:00','2019-03-03 10:30:00',3),(6,'Presentaion','Individual team presentation.','2019-03-05 12:00:00','2019-03-05 13:30:00',3);
  98. /*!40000 ALTER TABLE `events` ENABLE KEYS */;
  99. UNLOCK TABLES;
  100.  
  101. --
  102. -- Table structure for table `userevents`
  103. --
  104.  
  105. DROP TABLE IF EXISTS `userevents`;
  106. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  107.  SET character_set_client = utf8mb4 ;
  108. CREATE TABLE `userevents` (
  109.   `event_id` int(11) NOT NULL,
  110.   `user_id` int(11) NOT NULL,
  111.   PRIMARY KEY (`event_id`,`user_id`),
  112.   KEY `userevents_users_user_id_fk` (`user_id`),
  113.   CONSTRAINT `userevents_events_event_id_fk` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  114.   CONSTRAINT `userevents_users_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
  115. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  116. /*!40101 SET character_set_client = @saved_cs_client */;
  117.  
  118. --
  119. -- Dumping data for table `userevents`
  120. --
  121.  
  122. LOCK TABLES `userevents` WRITE;
  123. /*!40000 ALTER TABLE `userevents` DISABLE KEYS */;
  124. /*!40000 ALTER TABLE `userevents` ENABLE KEYS */;
  125. UNLOCK TABLES;
  126.  
  127. --
  128. -- Table structure for table `users`
  129. --
  130.  
  131. DROP TABLE IF EXISTS `users`;
  132. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  133.  SET character_set_client = utf8mb4 ;
  134. CREATE TABLE `users` (
  135.   `user_id` int(11) NOT NULL AUTO_INCREMENT,
  136.   `username` varchar(50) DEFAULT NULL,
  137.   `f_name` varchar(50) DEFAULT NULL,
  138.   `l_name` varchar(50) DEFAULT NULL,
  139.   `email` varchar(100) DEFAULT NULL,
  140.   `password` varchar(100) DEFAULT NULL,
  141.   `is_advisor` tinyint(1) NOT NULL DEFAULT '0',
  142.   `is_admin` tinyint(1) NOT NULL DEFAULT '0',
  143.   `conference_id` int(11) DEFAULT NULL,
  144.   PRIMARY KEY (`user_id`),
  145.   KEY `users_conferences_conference_id_fk` (`conference_id`),
  146.   CONSTRAINT `users_conferences_conference_id_fk` FOREIGN KEY (`conference_id`) REFERENCES `conferences` (`conference_id`)
  147. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
  148. /*!40101 SET character_set_client = @saved_cs_client */;
  149.  
  150. --
  151. -- Dumping data for table `users`
  152. --
  153.  
  154. LOCK TABLES `users` WRITE;
  155. /*!40000 ALTER TABLE `users` DISABLE KEYS */;
  156. INSERT INTO `users` VALUES (1,'advisor1','Justin','Johnson','justin.johnson@gmail.com','cGFzc3dvcmQ=',1,0,1),(2,'advisor2','Nathan','Nosko','nathan.nosko@gmail.com','cGFzc3dvcmQ=',1,0,2),(3,'advisor3','Peter','Picker','peter.picker@gmail.com','cGFzc3dvcmQ=',1,0,3),(4,'admin','Ruby','Rockefeller','ruby.rockefeller@gmail.com','cGFzc3dvcmQ=',0,1,NULL),(5,'student1','Zach','Zumper','zach.zumper@gmail.com','cGFzc3dvcmQ=',0,0,1),(6,'student2','Heather','Hunt','heather.hunt@gmail.com','cGFzc3dvcmQ=',0,0,2),(7,'student3','Mary','Morin','mary.morin@gmail.com','cGFzc3dvcmQ=',0,0,3);
  157. /*!40000 ALTER TABLE `users` ENABLE KEYS */;
  158. UNLOCK TABLES;
  159. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  160.  
  161. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  162. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  163. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  164. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  165. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  166. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  167. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  168.  
  169. -- Dump completed on 2019-01-25 20:21:30
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top