Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
- --
- -- Host: localhost Database: lookout
- -- ------------------------------------------------------
- -- Server version 8.0.13
- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
- /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
- /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
- SET NAMES utf8 ;
- /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
- /*!40103 SET TIME_ZONE='+00:00' */;
- /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
- /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
- /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
- /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
- --
- -- Table structure for table `advisors`
- --
- DROP TABLE IF EXISTS `advisors`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- SET character_set_client = utf8mb4 ;
- CREATE TABLE `advisors` (
- `advisor_id` int(11) NOT NULL,
- `student_id` int(11) NOT NULL,
- PRIMARY KEY (`advisor_id`,`student_id`),
- KEY `advisors_users_user_id_fk_2` (`student_id`),
- CONSTRAINT `advisors_users_user_id_fk` FOREIGN KEY (`advisor_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `advisors_users_user_id_fk_2` FOREIGN KEY (`student_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `advisors`
- --
- LOCK TABLES `advisors` WRITE;
- /*!40000 ALTER TABLE `advisors` DISABLE KEYS */;
- INSERT INTO `advisors` VALUES (1,5),(2,6),(3,7);
- /*!40000 ALTER TABLE `advisors` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `conferences`
- --
- DROP TABLE IF EXISTS `conferences`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- SET character_set_client = utf8mb4 ;
- CREATE TABLE `conferences` (
- `conference_id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(100) NOT NULL,
- `start_date` date NOT NULL,
- `end_date` date NOT NULL,
- PRIMARY KEY (`conference_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `conferences`
- --
- LOCK TABLES `conferences` WRITE;
- /*!40000 ALTER TABLE `conferences` DISABLE KEYS */;
- 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');
- /*!40000 ALTER TABLE `conferences` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `events`
- --
- DROP TABLE IF EXISTS `events`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- SET character_set_client = utf8mb4 ;
- CREATE TABLE `events` (
- `event_id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(50) NOT NULL,
- `description` varchar(200) NOT NULL,
- `start_time` datetime NOT NULL,
- `end_time` datetime NOT NULL,
- `conference_id` int(11) NOT NULL,
- PRIMARY KEY (`event_id`),
- KEY `events_conferences_conference_id_fk` (`conference_id`),
- CONSTRAINT `events_conferences_conference_id_fk` FOREIGN KEY (`conference_id`) REFERENCES `conferences` (`conference_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `events`
- --
- LOCK TABLES `events` WRITE;
- /*!40000 ALTER TABLE `events` DISABLE KEYS */;
- 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);
- /*!40000 ALTER TABLE `events` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `userevents`
- --
- DROP TABLE IF EXISTS `userevents`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- SET character_set_client = utf8mb4 ;
- CREATE TABLE `userevents` (
- `event_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL,
- PRIMARY KEY (`event_id`,`user_id`),
- KEY `userevents_users_user_id_fk` (`user_id`),
- CONSTRAINT `userevents_events_event_id_fk` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `userevents_users_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `userevents`
- --
- LOCK TABLES `userevents` WRITE;
- /*!40000 ALTER TABLE `userevents` DISABLE KEYS */;
- /*!40000 ALTER TABLE `userevents` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `users`
- --
- DROP TABLE IF EXISTS `users`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- SET character_set_client = utf8mb4 ;
- CREATE TABLE `users` (
- `user_id` int(11) NOT NULL AUTO_INCREMENT,
- `username` varchar(50) DEFAULT NULL,
- `f_name` varchar(50) DEFAULT NULL,
- `l_name` varchar(50) DEFAULT NULL,
- `email` varchar(100) DEFAULT NULL,
- `password` varchar(100) DEFAULT NULL,
- `is_advisor` tinyint(1) NOT NULL DEFAULT '0',
- `is_admin` tinyint(1) NOT NULL DEFAULT '0',
- `conference_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`user_id`),
- KEY `users_conferences_conference_id_fk` (`conference_id`),
- CONSTRAINT `users_conferences_conference_id_fk` FOREIGN KEY (`conference_id`) REFERENCES `conferences` (`conference_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `users`
- --
- LOCK TABLES `users` WRITE;
- /*!40000 ALTER TABLE `users` DISABLE KEYS */;
- 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);
- /*!40000 ALTER TABLE `users` ENABLE KEYS */;
- UNLOCK TABLES;
- /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
- /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
- /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
- /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
- /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
- /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
- /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
- /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
- -- Dump completed on 2019-01-25 20:21:30
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement