Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE DATABASE IF NOT EXISTS `smartbuilding` /*!40100 DEFAULT CHARACTER SET utf8 */;
- USE `smartbuilding`;
- -- MySQL dump 10.13 Distrib 5.5.41, for debian-linux-gnu (i686)
- --
- -- Host: localhost Database: smartbuilding
- -- ------------------------------------------------------
- -- Server version 5.5.41-0ubuntu0.12.04.1
- /*!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 */;
- /*!40101 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 `amenities`
- --
- DROP TABLE IF EXISTS `amenities`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `amenities` (
- `id` int(11) NOT NULL,
- `name` varchar(45) DEFAULT NULL,
- `description` longtext,
- `time_limit` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `amenities`
- --
- LOCK TABLES `amenities` WRITE;
- /*!40000 ALTER TABLE `amenities` DISABLE KEYS */;
- /*!40000 ALTER TABLE `amenities` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `amenity_booking_statuses`
- --
- DROP TABLE IF EXISTS `amenity_booking_statuses`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `amenity_booking_statuses` (
- `id` int(11) NOT NULL,
- `status_name` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `amenity_booking_statuses`
- --
- LOCK TABLES `amenity_booking_statuses` WRITE;
- /*!40000 ALTER TABLE `amenity_booking_statuses` DISABLE KEYS */;
- /*!40000 ALTER TABLE `amenity_booking_statuses` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `amenity_bookings`
- --
- DROP TABLE IF EXISTS `amenity_bookings`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `amenity_bookings` (
- `id` int(11) NOT NULL,
- `amenity_id` int(11) DEFAULT NULL,
- `booking_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `start_time` datetime NOT NULL,
- `end_time` datetime NOT NULL,
- `additional_notes` text,
- `user_id` int(11) DEFAULT NULL,
- `amenity_booking_status_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_amenity_bookings_1_idx` (`user_id`),
- KEY `fk_amenity_bookings_2_idx` (`amenity_booking_status_id`),
- CONSTRAINT `fk_amenity_bookings_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_amenity_bookings_2` FOREIGN KEY (`amenity_booking_status_id`) REFERENCES `amenity_booking_statuses` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `amenity_bookings`
- --
- LOCK TABLES `amenity_bookings` WRITE;
- /*!40000 ALTER TABLE `amenity_bookings` DISABLE KEYS */;
- /*!40000 ALTER TABLE `amenity_bookings` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `amenity_gallery`
- --
- DROP TABLE IF EXISTS `amenity_gallery`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `amenity_gallery` (
- `id` int(11) NOT NULL,
- `amenity_id` int(11) DEFAULT NULL,
- `img_path` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_amenity_gallery_1_idx` (`amenity_id`),
- CONSTRAINT `fk_amenity_gallery_1` FOREIGN KEY (`amenity_id`) REFERENCES `amenities` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `amenity_gallery`
- --
- LOCK TABLES `amenity_gallery` WRITE;
- /*!40000 ALTER TABLE `amenity_gallery` DISABLE KEYS */;
- /*!40000 ALTER TABLE `amenity_gallery` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `amenity_schedule_friday`
- --
- DROP TABLE IF EXISTS `amenity_schedule_friday`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `amenity_schedule_friday` (
- `id` int(11) NOT NULL,
- `amenity_id` int(11) DEFAULT NULL,
- `opening_time` time DEFAULT NULL,
- `closing_time` time DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_amenity_schedule_friday_1_idx` (`amenity_id`),
- CONSTRAINT `fk_amenity_schedule_friday_1` FOREIGN KEY (`amenity_id`) REFERENCES `amenities` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `amenity_schedule_friday`
- --
- LOCK TABLES `amenity_schedule_friday` WRITE;
- /*!40000 ALTER TABLE `amenity_schedule_friday` DISABLE KEYS */;
- /*!40000 ALTER TABLE `amenity_schedule_friday` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `amenity_schedule_monday`
- --
- DROP TABLE IF EXISTS `amenity_schedule_monday`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `amenity_schedule_monday` (
- `id` int(11) NOT NULL,
- `amenity_id` int(11) DEFAULT NULL,
- `opening_time` time DEFAULT NULL,
- `closing_time` time DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_amenity_schedule_monday_1_idx` (`amenity_id`),
- CONSTRAINT `fk_amenity_schedule_monday_1` FOREIGN KEY (`amenity_id`) REFERENCES `amenities` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `amenity_schedule_monday`
- --
- LOCK TABLES `amenity_schedule_monday` WRITE;
- /*!40000 ALTER TABLE `amenity_schedule_monday` DISABLE KEYS */;
- /*!40000 ALTER TABLE `amenity_schedule_monday` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `amenity_schedule_saturday`
- --
- DROP TABLE IF EXISTS `amenity_schedule_saturday`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `amenity_schedule_saturday` (
- `id` int(11) NOT NULL,
- `amenity_id` int(11) DEFAULT NULL,
- `opening_time` time DEFAULT NULL,
- `closing_time` time DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_amenity_schedule_saturday_1_idx` (`amenity_id`),
- CONSTRAINT `fk_amenity_schedule_saturday_1` FOREIGN KEY (`amenity_id`) REFERENCES `amenities` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `amenity_schedule_saturday`
- --
- LOCK TABLES `amenity_schedule_saturday` WRITE;
- /*!40000 ALTER TABLE `amenity_schedule_saturday` DISABLE KEYS */;
- /*!40000 ALTER TABLE `amenity_schedule_saturday` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `amenity_schedule_sunday`
- --
- DROP TABLE IF EXISTS `amenity_schedule_sunday`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `amenity_schedule_sunday` (
- `id` int(11) NOT NULL,
- `amenity_id` int(11) DEFAULT NULL,
- `opening_time` time DEFAULT NULL,
- `closing_time` time DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_amenity_schedule_sunday_1_idx` (`amenity_id`),
- CONSTRAINT `fk_amenity_schedule_sunday_1` FOREIGN KEY (`amenity_id`) REFERENCES `amenities` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `amenity_schedule_sunday`
- --
- LOCK TABLES `amenity_schedule_sunday` WRITE;
- /*!40000 ALTER TABLE `amenity_schedule_sunday` DISABLE KEYS */;
- /*!40000 ALTER TABLE `amenity_schedule_sunday` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `amenity_schedule_thursday`
- --
- DROP TABLE IF EXISTS `amenity_schedule_thursday`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `amenity_schedule_thursday` (
- `id` int(11) NOT NULL,
- `amenity_id` int(11) DEFAULT NULL,
- `opening_time` time DEFAULT NULL,
- `closing_time` time DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_amenity_schedule_thursday_1_idx` (`amenity_id`),
- CONSTRAINT `fk_amenity_schedule_thursday_1` FOREIGN KEY (`amenity_id`) REFERENCES `amenities` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `amenity_schedule_thursday`
- --
- LOCK TABLES `amenity_schedule_thursday` WRITE;
- /*!40000 ALTER TABLE `amenity_schedule_thursday` DISABLE KEYS */;
- /*!40000 ALTER TABLE `amenity_schedule_thursday` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `amenity_schedule_tuesday`
- --
- DROP TABLE IF EXISTS `amenity_schedule_tuesday`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `amenity_schedule_tuesday` (
- `id` int(11) NOT NULL,
- `amenity_id` int(11) DEFAULT NULL,
- `opening_time` time DEFAULT NULL,
- `closing_time` time DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_amenity_schedule_tuesday_1_idx` (`amenity_id`),
- CONSTRAINT `fk_amenity_schedule_tuesday_1` FOREIGN KEY (`amenity_id`) REFERENCES `amenities` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `amenity_schedule_tuesday`
- --
- LOCK TABLES `amenity_schedule_tuesday` WRITE;
- /*!40000 ALTER TABLE `amenity_schedule_tuesday` DISABLE KEYS */;
- /*!40000 ALTER TABLE `amenity_schedule_tuesday` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `amenity_schedule_wednesday`
- --
- DROP TABLE IF EXISTS `amenity_schedule_wednesday`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `amenity_schedule_wednesday` (
- `id` int(11) NOT NULL,
- `amenity_id` int(11) DEFAULT NULL,
- `opening_time` time DEFAULT NULL,
- `closing_time` time DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_amenity_schedule_wednesday_1_idx` (`amenity_id`),
- CONSTRAINT `fk_amenity_schedule_wednesday_1` FOREIGN KEY (`amenity_id`) REFERENCES `amenities` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `amenity_schedule_wednesday`
- --
- LOCK TABLES `amenity_schedule_wednesday` WRITE;
- /*!40000 ALTER TABLE `amenity_schedule_wednesday` DISABLE KEYS */;
- /*!40000 ALTER TABLE `amenity_schedule_wednesday` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `announcements`
- --
- DROP TABLE IF EXISTS `announcements`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `announcements` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `title` varchar(45) DEFAULT NULL,
- `details` longtext,
- `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `building_id` int(11) DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- `accessible_to_residents` tinyint(1) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_announcements_1_idx` (`building_id`),
- KEY `fk_announcements_2_idx` (`user_id`),
- CONSTRAINT `fk_announcements_1` FOREIGN KEY (`building_id`) REFERENCES `buildings` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_announcements_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `announcements`
- --
- LOCK TABLES `announcements` WRITE;
- /*!40000 ALTER TABLE `announcements` DISABLE KEYS */;
- INSERT INTO `announcements` VALUES (1,'New Carpets on Floor 5','All carpets on floor 5 will be replaced on March 6th 9am - 5pm','2015-04-14 13:41:11',1,17,1),(2,'Water Outage','There will be a water outage for the entire building on March 4th 9am - 5pm. Remember to stock up!','2015-04-14 13:42:11',1,17,1),(3,'Window Changes - Floor 3','All Windows on Floor 3 will be replaced tomorrow at noon','2015-04-13 15:45:46',1,17,1),(4,'Window Changes - Floor 4','All Windows on Floor 4 will be replaced tomorrow at noon','2015-04-13 15:46:46',1,17,1),(5,'Window Changes - Floor 5','All Windows on Floor 5 will be replaced tomorrow at noon','2015-04-13 15:47:46',1,17,0),(6,'Window Changes - Floor 6','All Windows on Floor 6 will be replaced tomorrow at noon','2015-04-13 15:48:46',1,17,1),(7,'Window Changes - Floor 7','All Windows on Floor 7 will be replaced tomorrow at noon','2015-04-13 15:49:46',1,17,1);
- /*!40000 ALTER TABLE `announcements` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `bike_assignment_statuses`
- --
- DROP TABLE IF EXISTS `bike_assignment_statuses`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `bike_assignment_statuses` (
- `id` int(11) NOT NULL,
- `status_name` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `bike_assignment_statuses`
- --
- LOCK TABLES `bike_assignment_statuses` WRITE;
- /*!40000 ALTER TABLE `bike_assignment_statuses` DISABLE KEYS */;
- /*!40000 ALTER TABLE `bike_assignment_statuses` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `bike_assignments`
- --
- DROP TABLE IF EXISTS `bike_assignments`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `bike_assignments` (
- `id` int(11) NOT NULL,
- `bike_id` int(11) DEFAULT NULL,
- `bike_storage_id` int(11) DEFAULT NULL,
- `assignment_status_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_bike_assignments_1_idx` (`bike_id`),
- KEY `fk_bike_assignments_2_idx` (`bike_storage_id`),
- KEY `fk_bike_assignments_3_idx` (`assignment_status_id`),
- CONSTRAINT `fk_bike_assignments_1` FOREIGN KEY (`bike_id`) REFERENCES `bikes` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_bike_assignments_2` FOREIGN KEY (`bike_storage_id`) REFERENCES `bike_storages` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_bike_assignments_3` FOREIGN KEY (`assignment_status_id`) REFERENCES `bike_assignment_statuses` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `bike_assignments`
- --
- LOCK TABLES `bike_assignments` WRITE;
- /*!40000 ALTER TABLE `bike_assignments` DISABLE KEYS */;
- /*!40000 ALTER TABLE `bike_assignments` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `bike_images`
- --
- DROP TABLE IF EXISTS `bike_images`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `bike_images` (
- `id` int(11) NOT NULL,
- `bike_id` int(11) DEFAULT NULL,
- `img_path` varchar(145) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_bike_images_1_idx` (`bike_id`),
- CONSTRAINT `fk_bike_images_1` FOREIGN KEY (`bike_id`) REFERENCES `bikes` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `bike_images`
- --
- LOCK TABLES `bike_images` WRITE;
- /*!40000 ALTER TABLE `bike_images` DISABLE KEYS */;
- /*!40000 ALTER TABLE `bike_images` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `bike_storage_locations`
- --
- DROP TABLE IF EXISTS `bike_storage_locations`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `bike_storage_locations` (
- `id` int(11) NOT NULL,
- `location_name` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `bike_storage_locations`
- --
- LOCK TABLES `bike_storage_locations` WRITE;
- /*!40000 ALTER TABLE `bike_storage_locations` DISABLE KEYS */;
- /*!40000 ALTER TABLE `bike_storage_locations` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `bike_storages`
- --
- DROP TABLE IF EXISTS `bike_storages`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `bike_storages` (
- `id` int(11) NOT NULL,
- `storage_number` varchar(45) DEFAULT NULL,
- `bike_storage_location_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_bike_storages_1_idx` (`bike_storage_location_id`),
- CONSTRAINT `fk_bike_storages_1` FOREIGN KEY (`bike_storage_location_id`) REFERENCES `bike_storage_locations` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `bike_storages`
- --
- LOCK TABLES `bike_storages` WRITE;
- /*!40000 ALTER TABLE `bike_storages` DISABLE KEYS */;
- /*!40000 ALTER TABLE `bike_storages` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `bikes`
- --
- DROP TABLE IF EXISTS `bikes`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `bikes` (
- `id` int(11) NOT NULL,
- `name` varchar(45) DEFAULT NULL,
- `make` varchar(45) DEFAULT NULL,
- `model` varchar(45) DEFAULT NULL,
- `year` varchar(45) DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_bikes_1_idx` (`user_id`),
- CONSTRAINT `fk_bikes_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `bikes`
- --
- LOCK TABLES `bikes` WRITE;
- /*!40000 ALTER TABLE `bikes` DISABLE KEYS */;
- /*!40000 ALTER TABLE `bikes` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `building_licensed_app_functions`
- --
- DROP TABLE IF EXISTS `building_licensed_app_functions`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `building_licensed_app_functions` (
- `id` int(11) NOT NULL,
- `building_licensed_app_id` int(11) DEFAULT NULL,
- `licensed_app_function_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_building_licensed_app_functions_1_idx` (`building_licensed_app_id`),
- KEY `fk_building_licensed_app_functions_2_idx` (`licensed_app_function_id`),
- CONSTRAINT `fk_building_licensed_app_functions_1` FOREIGN KEY (`building_licensed_app_id`) REFERENCES `building_licensed_apps` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_building_licensed_app_functions_2` FOREIGN KEY (`licensed_app_function_id`) REFERENCES `licensed_app_functions` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `building_licensed_app_functions`
- --
- LOCK TABLES `building_licensed_app_functions` WRITE;
- /*!40000 ALTER TABLE `building_licensed_app_functions` DISABLE KEYS */;
- /*!40000 ALTER TABLE `building_licensed_app_functions` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `building_licensed_apps`
- --
- DROP TABLE IF EXISTS `building_licensed_apps`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `building_licensed_apps` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `building_id` int(11) DEFAULT NULL,
- `licensed_app_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_building_licensed_apps_1_idx` (`building_id`),
- KEY `fk_building_licensed_apps_2_idx` (`licensed_app_id`),
- CONSTRAINT `fk_building_licensed_apps_1` FOREIGN KEY (`building_id`) REFERENCES `buildings` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_building_licensed_apps_2` FOREIGN KEY (`licensed_app_id`) REFERENCES `licensed_apps` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `building_licensed_apps`
- --
- LOCK TABLES `building_licensed_apps` WRITE;
- /*!40000 ALTER TABLE `building_licensed_apps` DISABLE KEYS */;
- INSERT INTO `building_licensed_apps` VALUES (1,1,1),(2,1,2),(3,1,3),(4,1,4),(5,1,5),(6,1,6),(7,1,7),(8,1,8),(9,1,9),(10,1,10),(11,1,11),(12,1,13),(13,1,14),(14,1,15),(15,1,16),(16,2,1),(17,2,2),(18,2,3);
- /*!40000 ALTER TABLE `building_licensed_apps` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `buildings`
- --
- DROP TABLE IF EXISTS `buildings`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `buildings` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(45) DEFAULT NULL,
- `site_code` varchar(45) DEFAULT NULL,
- `address` varchar(245) DEFAULT NULL,
- `managing_company_id` int(11) DEFAULT NULL,
- `description` text,
- `phone_number` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_buildings_1_idx` (`managing_company_id`),
- CONSTRAINT `fk_buildings_1` FOREIGN KEY (`managing_company_id`) REFERENCES `managing_companies` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `buildings`
- --
- LOCK TABLES `buildings` WRITE;
- /*!40000 ALTER TABLE `buildings` DISABLE KEYS */;
- INSERT INTO `buildings` VALUES (1,'Building 1','Building 1 Site Code','1732 Woodward Ct',1,'Paramount Properties. All Rights Reserved.','613-524-8875'),(2,'Building 2','Building 2 Site Code','200 Bank Street',2,'Capital Concierge','613-567-9089');
- /*!40000 ALTER TABLE `buildings` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `classified_ad_category`
- --
- DROP TABLE IF EXISTS `classified_ad_category`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `classified_ad_category` (
- `id` int(11) NOT NULL,
- `parent_category_id` int(11) DEFAULT '0',
- `category_name` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_classified_ad_category_1_idx` (`parent_category_id`),
- CONSTRAINT `fk_classified_ad_category_1` FOREIGN KEY (`parent_category_id`) REFERENCES `classified_ad_category` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `classified_ad_category`
- --
- LOCK TABLES `classified_ad_category` WRITE;
- /*!40000 ALTER TABLE `classified_ad_category` DISABLE KEYS */;
- /*!40000 ALTER TABLE `classified_ad_category` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `classified_ad_item`
- --
- DROP TABLE IF EXISTS `classified_ad_item`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `classified_ad_item` (
- `id` int(11) NOT NULL,
- `title` varchar(45) DEFAULT NULL,
- `description` text,
- `price` double DEFAULT NULL,
- `classified_ad_category_id` int(11) DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- `approved_status` tinyint(1) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_classified_ad_item_1_idx` (`classified_ad_category_id`),
- KEY `fk_classified_ad_item_2_idx` (`user_id`),
- CONSTRAINT `fk_classified_ad_item_1` FOREIGN KEY (`classified_ad_category_id`) REFERENCES `classified_ad_category` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_classified_ad_item_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `classified_ad_item`
- --
- LOCK TABLES `classified_ad_item` WRITE;
- /*!40000 ALTER TABLE `classified_ad_item` DISABLE KEYS */;
- /*!40000 ALTER TABLE `classified_ad_item` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `classified_ad_item_images`
- --
- DROP TABLE IF EXISTS `classified_ad_item_images`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `classified_ad_item_images` (
- `id` int(11) NOT NULL,
- `classified_ad_item_id` int(11) DEFAULT NULL,
- `img_path` varchar(145) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_classified_ad_item_images_1_idx` (`classified_ad_item_id`),
- CONSTRAINT `fk_classified_ad_item_images_1` FOREIGN KEY (`classified_ad_item_id`) REFERENCES `classified_ad_item` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `classified_ad_item_images`
- --
- LOCK TABLES `classified_ad_item_images` WRITE;
- /*!40000 ALTER TABLE `classified_ad_item_images` DISABLE KEYS */;
- /*!40000 ALTER TABLE `classified_ad_item_images` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `community_events`
- --
- DROP TABLE IF EXISTS `community_events`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `community_events` (
- `id` int(11) NOT NULL,
- `title` varchar(45) DEFAULT NULL,
- `description` longtext,
- `location` varchar(45) DEFAULT NULL,
- `start_datetime` datetime DEFAULT NULL,
- `end_datetime` datetime DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_community_events_1_idx` (`user_id`),
- CONSTRAINT `fk_community_events_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `community_events`
- --
- LOCK TABLES `community_events` WRITE;
- /*!40000 ALTER TABLE `community_events` DISABLE KEYS */;
- /*!40000 ALTER TABLE `community_events` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `community_events_rsvps`
- --
- DROP TABLE IF EXISTS `community_events_rsvps`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `community_events_rsvps` (
- `id` int(11) NOT NULL,
- `community_event_id` int(11) DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_community_events_rsvps_1_idx` (`community_event_id`),
- KEY `fk_community_events_rsvps_2_idx` (`user_id`),
- CONSTRAINT `fk_community_events_rsvps_1` FOREIGN KEY (`community_event_id`) REFERENCES `community_events` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_community_events_rsvps_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `community_events_rsvps`
- --
- LOCK TABLES `community_events_rsvps` WRITE;
- /*!40000 ALTER TABLE `community_events_rsvps` DISABLE KEYS */;
- /*!40000 ALTER TABLE `community_events_rsvps` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `documents`
- --
- DROP TABLE IF EXISTS `documents`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `documents` (
- `id` int(11) NOT NULL,
- `name` varchar(45) DEFAULT NULL,
- `description` text,
- `document_path` varchar(145) DEFAULT NULL,
- `accessible_to_residents` tinyint(1) DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_documents_1_idx` (`user_id`),
- CONSTRAINT `fk_documents_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `documents`
- --
- LOCK TABLES `documents` WRITE;
- /*!40000 ALTER TABLE `documents` DISABLE KEYS */;
- /*!40000 ALTER TABLE `documents` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `entry_instructions`
- --
- DROP TABLE IF EXISTS `entry_instructions`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `entry_instructions` (
- `id` int(11) NOT NULL,
- `visitor_first_name` varchar(45) DEFAULT NULL,
- `visitor_last_name` varchar(45) DEFAULT NULL,
- `needs_parking` tinyint(1) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `entry_instructions`
- --
- LOCK TABLES `entry_instructions` WRITE;
- /*!40000 ALTER TABLE `entry_instructions` DISABLE KEYS */;
- /*!40000 ALTER TABLE `entry_instructions` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `entry_instructions_vehicles`
- --
- DROP TABLE IF EXISTS `entry_instructions_vehicles`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `entry_instructions_vehicles` (
- `id` int(11) NOT NULL,
- `entry_instruction_id` int(11) DEFAULT NULL,
- `vehicle_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_entry_instructions_vehicles_1_idx` (`entry_instruction_id`),
- KEY `fk_entry_instructions_vehicles_2_idx` (`vehicle_id`),
- CONSTRAINT `fk_entry_instructions_vehicles_1` FOREIGN KEY (`entry_instruction_id`) REFERENCES `entry_instructions` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_entry_instructions_vehicles_2` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `entry_instructions_vehicles`
- --
- LOCK TABLES `entry_instructions_vehicles` WRITE;
- /*!40000 ALTER TABLE `entry_instructions_vehicles` DISABLE KEYS */;
- /*!40000 ALTER TABLE `entry_instructions_vehicles` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `guest_suite_bookings`
- --
- DROP TABLE IF EXISTS `guest_suite_bookings`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `guest_suite_bookings` (
- `id` int(11) NOT NULL,
- `visitor_first_name` varchar(45) DEFAULT NULL,
- `visitor_last_name` varchar(45) DEFAULT NULL,
- `needs_parking` tinyint(1) DEFAULT NULL,
- `check_in_date` date DEFAULT NULL,
- `check_out_date` date DEFAULT NULL,
- `actual_check_in_date_time` datetime DEFAULT NULL,
- `actual_check_out_date_time` datetime DEFAULT NULL,
- `booked_by` int(11) DEFAULT NULL,
- `guest_suite_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_guest_suite_bookings_1_idx` (`booked_by`),
- KEY `fk_guest_suite_bookings_2_idx` (`guest_suite_id`),
- CONSTRAINT `fk_guest_suite_bookings_1` FOREIGN KEY (`booked_by`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_guest_suite_bookings_2` FOREIGN KEY (`guest_suite_id`) REFERENCES `guest_suites` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `guest_suite_bookings`
- --
- LOCK TABLES `guest_suite_bookings` WRITE;
- /*!40000 ALTER TABLE `guest_suite_bookings` DISABLE KEYS */;
- /*!40000 ALTER TABLE `guest_suite_bookings` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `guest_suite_vehicle_bookings`
- --
- DROP TABLE IF EXISTS `guest_suite_vehicle_bookings`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `guest_suite_vehicle_bookings` (
- `id` int(11) NOT NULL,
- `vehicle_id` int(11) DEFAULT NULL,
- `guest_suite_booking_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_guest_suite_vehicle_bookings_1_idx` (`vehicle_id`),
- KEY `fk_guest_suite_vehicle_bookings_2_idx` (`guest_suite_booking_id`),
- CONSTRAINT `fk_guest_suite_vehicle_bookings_1` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_guest_suite_vehicle_bookings_2` FOREIGN KEY (`guest_suite_booking_id`) REFERENCES `guest_suite_bookings` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `guest_suite_vehicle_bookings`
- --
- LOCK TABLES `guest_suite_vehicle_bookings` WRITE;
- /*!40000 ALTER TABLE `guest_suite_vehicle_bookings` DISABLE KEYS */;
- /*!40000 ALTER TABLE `guest_suite_vehicle_bookings` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `guest_suites`
- --
- DROP TABLE IF EXISTS `guest_suites`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `guest_suites` (
- `id` int(11) NOT NULL,
- `suite_number` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `guest_suites`
- --
- LOCK TABLES `guest_suites` WRITE;
- /*!40000 ALTER TABLE `guest_suites` DISABLE KEYS */;
- /*!40000 ALTER TABLE `guest_suites` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `incident_report_witnesses`
- --
- DROP TABLE IF EXISTS `incident_report_witnesses`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `incident_report_witnesses` (
- `id` int(11) NOT NULL,
- `incident_report_id` int(11) DEFAULT NULL,
- `witness_name` varchar(145) DEFAULT NULL,
- `witness_address` longtext,
- `witness_phone_number` varchar(45) DEFAULT NULL,
- `witness_email` varchar(45) DEFAULT NULL,
- `witness_date_of_birth` varchar(45) DEFAULT NULL,
- `witness_statement` longtext,
- PRIMARY KEY (`id`),
- KEY `fk_incident_report_witnesses_1_idx` (`incident_report_id`),
- CONSTRAINT `fk_incident_report_witnesses_1` FOREIGN KEY (`incident_report_id`) REFERENCES `incident_reports` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `incident_report_witnesses`
- --
- LOCK TABLES `incident_report_witnesses` WRITE;
- /*!40000 ALTER TABLE `incident_report_witnesses` DISABLE KEYS */;
- /*!40000 ALTER TABLE `incident_report_witnesses` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `incident_reports`
- --
- DROP TABLE IF EXISTS `incident_reports`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `incident_reports` (
- `id` int(11) NOT NULL,
- `title` varchar(45) DEFAULT NULL,
- `description` longtext,
- `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `user_id` int(11) DEFAULT NULL,
- `reported_to_police` tinyint(1) DEFAULT NULL,
- `police_station_name` varchar(145) DEFAULT NULL,
- `police_station_address` longtext,
- `police_officer_name` varchar(145) DEFAULT NULL,
- `police_officer_number` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `incident_reports`
- --
- LOCK TABLES `incident_reports` WRITE;
- /*!40000 ALTER TABLE `incident_reports` DISABLE KEYS */;
- /*!40000 ALTER TABLE `incident_reports` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `licensed_app_functions`
- --
- DROP TABLE IF EXISTS `licensed_app_functions`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `licensed_app_functions` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `licensed_app_id` int(11) DEFAULT NULL,
- `function_name` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_licensed_app_functions_1_idx` (`licensed_app_id`),
- CONSTRAINT `fk_licensed_app_functions_1` FOREIGN KEY (`licensed_app_id`) REFERENCES `licensed_apps` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `licensed_app_functions`
- --
- LOCK TABLES `licensed_app_functions` WRITE;
- /*!40000 ALTER TABLE `licensed_app_functions` DISABLE KEYS */;
- INSERT INTO `licensed_app_functions` VALUES (1,1,'Create'),(2,1,'View'),(3,1,'Edit'),(4,1,'Delete'),(5,2,'Create'),(6,2,'View'),(7,2,'Edit'),(8,2,'Delete'),(9,3,'Create'),(10,3,'View'),(11,3,'Edit'),(12,3,'Delete'),(13,4,'Create'),(14,4,'View'),(15,4,'Edit'),(16,4,'Delete'),(17,5,'Create'),(18,5,'View'),(19,5,'Edit'),(20,5,'Delete'),(21,5,'Manage Approvals'),(22,6,'Create'),(23,6,'View'),(24,6,'Edit'),(25,6,'Delete'),(26,7,'Create'),(27,7,'View'),(28,7,'Edit'),(29,7,'Delete'),(30,8,'Create'),(31,8,'View'),(32,8,'Edit'),(33,8,'Delete'),(34,8,'Notify'),(35,9,'Create'),(36,9,'View'),(37,9,'Edit'),(38,9,'Delete'),(39,9,'Manage Approvals'),(40,10,'Create'),(41,10,'View'),(42,10,'Edit'),(43,10,'Delete'),(44,10,'Manage Approvals'),(45,11,'Create'),(46,11,'View'),(47,11,'Edit'),(48,11,'Delete'),(49,11,'Manage Approvals'),(50,13,'Create'),(51,13,'View'),(52,13,'Edit'),(53,13,'Delete'),(54,14,'Create'),(55,14,'View'),(56,14,'Edit'),(57,14,'Delete'),(58,15,'Create'),(59,15,'View'),(60,15,'Edit'),(61,15,'Delete'),(62,16,'Create'),(63,16,'View'),(64,16,'Edit'),(65,16,'Delete');
- /*!40000 ALTER TABLE `licensed_app_functions` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `licensed_apps`
- --
- DROP TABLE IF EXISTS `licensed_apps`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `licensed_apps` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `licensed_apps`
- --
- LOCK TABLES `licensed_apps` WRITE;
- /*!40000 ALTER TABLE `licensed_apps` DISABLE KEYS */;
- INSERT INTO `licensed_apps` VALUES (1,'Amenities'),(2,'Guest Suite'),(3,'Maintenance Requests'),(4,'Documents'),(5,'Classified Ads'),(6,'Announcements'),(7,'Entry Instructions'),(8,'Parcel Delivery'),(9,'Community Calendar'),(10,'Lockers'),(11,'Bike Storage'),(12,'Parking'),(13,'Incident Reporting'),(14,'Financial Reports'),(15,'Work Orders'),(16,'Users');
- /*!40000 ALTER TABLE `licensed_apps` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `locker_assignment_statuses`
- --
- DROP TABLE IF EXISTS `locker_assignment_statuses`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `locker_assignment_statuses` (
- `id` int(11) NOT NULL,
- `status_name` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `locker_assignment_statuses`
- --
- LOCK TABLES `locker_assignment_statuses` WRITE;
- /*!40000 ALTER TABLE `locker_assignment_statuses` DISABLE KEYS */;
- /*!40000 ALTER TABLE `locker_assignment_statuses` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `locker_assignments`
- --
- DROP TABLE IF EXISTS `locker_assignments`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `locker_assignments` (
- `id` int(11) NOT NULL,
- `locker_id` int(11) DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- `lock_type` int(11) DEFAULT NULL,
- `lock_combination_number` varchar(145) DEFAULT NULL,
- `assignment_status_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_locker_assignments_1_idx` (`locker_id`),
- KEY `fk_locker_assignments_2_idx` (`user_id`),
- KEY `fk_locker_assignments_3_idx` (`assignment_status_id`),
- CONSTRAINT `fk_locker_assignments_1` FOREIGN KEY (`locker_id`) REFERENCES `lockers` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_locker_assignments_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_locker_assignments_3` FOREIGN KEY (`assignment_status_id`) REFERENCES `locker_assignment_statuses` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `locker_assignments`
- --
- LOCK TABLES `locker_assignments` WRITE;
- /*!40000 ALTER TABLE `locker_assignments` DISABLE KEYS */;
- /*!40000 ALTER TABLE `locker_assignments` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `locker_locations`
- --
- DROP TABLE IF EXISTS `locker_locations`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `locker_locations` (
- `id` int(11) NOT NULL,
- `location_name` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `locker_locations`
- --
- LOCK TABLES `locker_locations` WRITE;
- /*!40000 ALTER TABLE `locker_locations` DISABLE KEYS */;
- /*!40000 ALTER TABLE `locker_locations` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `lockers`
- --
- DROP TABLE IF EXISTS `lockers`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `lockers` (
- `id` int(11) NOT NULL,
- `locker_location_id` int(11) DEFAULT NULL,
- `legal_description` varchar(45) DEFAULT NULL,
- `locker_number` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_lockers_1_idx` (`locker_location_id`),
- CONSTRAINT `fk_lockers_1` FOREIGN KEY (`locker_location_id`) REFERENCES `locker_locations` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `lockers`
- --
- LOCK TABLES `lockers` WRITE;
- /*!40000 ALTER TABLE `lockers` DISABLE KEYS */;
- /*!40000 ALTER TABLE `lockers` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `maintenance_request_statuses`
- --
- DROP TABLE IF EXISTS `maintenance_request_statuses`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `maintenance_request_statuses` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `status_name` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `maintenance_request_statuses`
- --
- LOCK TABLES `maintenance_request_statuses` WRITE;
- /*!40000 ALTER TABLE `maintenance_request_statuses` DISABLE KEYS */;
- INSERT INTO `maintenance_request_statuses` VALUES (1,'Pending'),(2,'Completed'),(3,'Declined');
- /*!40000 ALTER TABLE `maintenance_request_statuses` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `maintenance_request_urgencies`
- --
- DROP TABLE IF EXISTS `maintenance_request_urgencies`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `maintenance_request_urgencies` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `urgency_name` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `maintenance_request_urgencies`
- --
- LOCK TABLES `maintenance_request_urgencies` WRITE;
- /*!40000 ALTER TABLE `maintenance_request_urgencies` DISABLE KEYS */;
- INSERT INTO `maintenance_request_urgencies` VALUES (1,'High'),(2,'Medium'),(3,'Low');
- /*!40000 ALTER TABLE `maintenance_request_urgencies` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `maintenance_requests`
- --
- DROP TABLE IF EXISTS `maintenance_requests`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `maintenance_requests` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) DEFAULT NULL,
- `maintenance_request_status_id` int(11) DEFAULT NULL,
- `title` varchar(255) DEFAULT NULL,
- `description` longtext,
- `maintenance_request_urgency_id` int(11) DEFAULT NULL,
- `request_date` datetime DEFAULT NULL,
- `consent_access` tinyint(1) DEFAULT NULL,
- `completed_date` datetime DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_maintenance_requests_1_idx` (`user_id`),
- KEY `fk_maintenance_requests_2_idx` (`maintenance_request_status_id`),
- KEY `fk_maintenance_requests_3_idx` (`maintenance_request_urgency_id`),
- CONSTRAINT `fk_maintenance_requests_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_maintenance_requests_2` FOREIGN KEY (`maintenance_request_status_id`) REFERENCES `maintenance_request_statuses` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_maintenance_requests_3` FOREIGN KEY (`maintenance_request_urgency_id`) REFERENCES `maintenance_request_urgencies` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `maintenance_requests`
- --
- LOCK TABLES `maintenance_requests` WRITE;
- /*!40000 ALTER TABLE `maintenance_requests` DISABLE KEYS */;
- INSERT INTO `maintenance_requests` VALUES (1,17,2,'Change Windows','I would like my windows changed ASAP',2,'2015-04-13 10:00:45',1,NULL),(2,17,1,'Fix Sink','My sink is clogged',1,'2015-04-13 11:00:45',1,NULL),(3,17,3,'Heater not working','The heater is not working in our apartment',1,'2015-04-13 12:00:45',1,NULL),(5,17,1,'Shiles maintenance request title','Shiles maintenance request description',1,'2015-04-14 12:00:45',1,NULL),(14,17,1,'gsdfsd','gsdfsf',1,'2015-03-04 00:00:00',1,NULL),(15,17,1,'Carlys maintenance request','maintenance request222222',2,'2015-08-04 00:00:00',1,NULL),(35,17,1,'bbbbb','bbbbbbbbbbb',1,'2015-10-04 00:00:00',1,NULL),(36,17,1,'cccccccc','ccccccccccccc',1,'2015-11-04 00:00:00',1,NULL),(37,17,1,'fffffffff','fffffffffff',3,'2015-07-04 00:00:00',0,NULL);
- /*!40000 ALTER TABLE `maintenance_requests` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `managing_companies`
- --
- DROP TABLE IF EXISTS `managing_companies`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `managing_companies` (
- `id` int(11) NOT NULL,
- `name` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `managing_companies`
- --
- LOCK TABLES `managing_companies` WRITE;
- /*!40000 ALTER TABLE `managing_companies` DISABLE KEYS */;
- INSERT INTO `managing_companies` VALUES (1,'Company 1'),(2,'Company 2');
- /*!40000 ALTER TABLE `managing_companies` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `package_deliveries`
- --
- DROP TABLE IF EXISTS `package_deliveries`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `package_deliveries` (
- `id` int(11) NOT NULL,
- `name` varchar(45) DEFAULT NULL,
- `delivery_date` date DEFAULT NULL,
- `notes` longtext,
- `user_id` int(11) DEFAULT NULL,
- `package_delivery_status_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_package_deliveries_1_idx` (`package_delivery_status_id`),
- CONSTRAINT `fk_package_deliveries_1` FOREIGN KEY (`package_delivery_status_id`) REFERENCES `package_delivery_statuses` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `package_deliveries`
- --
- LOCK TABLES `package_deliveries` WRITE;
- /*!40000 ALTER TABLE `package_deliveries` DISABLE KEYS */;
- /*!40000 ALTER TABLE `package_deliveries` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `package_delivery_statuses`
- --
- DROP TABLE IF EXISTS `package_delivery_statuses`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `package_delivery_statuses` (
- `id` int(11) NOT NULL,
- `status_name` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `package_delivery_statuses`
- --
- LOCK TABLES `package_delivery_statuses` WRITE;
- /*!40000 ALTER TABLE `package_delivery_statuses` DISABLE KEYS */;
- /*!40000 ALTER TABLE `package_delivery_statuses` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `role_permissions`
- --
- DROP TABLE IF EXISTS `role_permissions`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `role_permissions` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `role_id` int(11) DEFAULT NULL,
- `building_licensed_app_id` int(11) DEFAULT NULL,
- `licensed_app_function_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_role_permissions_1_idx` (`role_id`),
- KEY `fk_role_permissions_2_idx` (`building_licensed_app_id`),
- KEY `fk_role_permissions_3_idx` (`licensed_app_function_id`),
- CONSTRAINT `fk_role_permissions_1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_role_permissions_2` FOREIGN KEY (`building_licensed_app_id`) REFERENCES `building_licensed_apps` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_role_permissions_3` FOREIGN KEY (`licensed_app_function_id`) REFERENCES `licensed_app_functions` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `role_permissions`
- --
- LOCK TABLES `role_permissions` WRITE;
- /*!40000 ALTER TABLE `role_permissions` DISABLE KEYS */;
- /*!40000 ALTER TABLE `role_permissions` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `roles`
- --
- DROP TABLE IF EXISTS `roles`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `roles` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `role_name` varchar(45) DEFAULT NULL,
- `color_code` varchar(45) DEFAULT '#D8BF3E',
- `can_manage_all_buildings` tinyint(1) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `roles`
- --
- LOCK TABLES `roles` WRITE;
- /*!40000 ALTER TABLE `roles` DISABLE KEYS */;
- INSERT INTO `roles` VALUES (1,'System Administrator','#D83E55',1),(2,'Superintendent','#D8BF3E',1);
- /*!40000 ALTER TABLE `roles` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `schema_migrations`
- --
- DROP TABLE IF EXISTS `schema_migrations`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `schema_migrations` (
- `version` varchar(255) NOT NULL,
- UNIQUE KEY `unique_schema_migrations` (`version`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `schema_migrations`
- --
- LOCK TABLES `schema_migrations` WRITE;
- /*!40000 ALTER TABLE `schema_migrations` DISABLE KEYS */;
- /*!40000 ALTER TABLE `schema_migrations` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `tokens`
- --
- DROP TABLE IF EXISTS `tokens`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `tokens` (
- `id` int(11) NOT NULL,
- `token` varchar(45) DEFAULT NULL,
- `used` tinyint(1) DEFAULT '0',
- `building_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_tokens_1_idx` (`building_id`),
- CONSTRAINT `fk_tokens_1` FOREIGN KEY (`building_id`) REFERENCES `buildings` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `tokens`
- --
- LOCK TABLES `tokens` WRITE;
- /*!40000 ALTER TABLE `tokens` DISABLE KEYS */;
- INSERT INTO `tokens` VALUES (1,'D91FBFBB19',0,1),(2,'27CA9B87B4',0,1),(3,'2CAD68F9B3',0,1),(4,'484C8CDA5F',1,1),(5,'5D04DBB46A',0,1);
- /*!40000 ALTER TABLE `tokens` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `user_tokens`
- --
- DROP TABLE IF EXISTS `user_tokens`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `user_tokens` (
- `id` int(11) NOT NULL,
- `token_id` int(11) DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- `date_used` datetime DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_user_tokens_1_idx` (`user_id`),
- KEY `fk_user_tokens_2_idx` (`token_id`),
- CONSTRAINT `fk_user_tokens_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_user_tokens_2` FOREIGN KEY (`token_id`) REFERENCES `tokens` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `user_tokens`
- --
- LOCK TABLES `user_tokens` WRITE;
- /*!40000 ALTER TABLE `user_tokens` DISABLE KEYS */;
- /*!40000 ALTER TABLE `user_tokens` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `users`
- --
- DROP TABLE IF EXISTS `users`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `users` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `email` varchar(255) NOT NULL DEFAULT '',
- `password_digest` text NOT NULL,
- `password_reset_token` varchar(255) DEFAULT NULL,
- `password_reset_sent_at` datetime DEFAULT NULL,
- `created_at` datetime DEFAULT NULL,
- `phone` varchar(45) DEFAULT NULL,
- `building_id` int(11) DEFAULT NULL,
- `role_id` int(11) DEFAULT NULL,
- `first_name` varchar(255) DEFAULT NULL,
- `last_name` varchar(255) DEFAULT NULL,
- `email_confirmed` tinyint(4) DEFAULT NULL,
- `remember_token` varchar(255) DEFAULT NULL,
- `password_sent_at` varchar(255) DEFAULT NULL,
- `unit` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `email_UNIQUE` (`email`),
- KEY `fk_users_1_idx` (`building_id`),
- KEY `fk_users_2_idx` (`role_id`),
- CONSTRAINT `fk_users_1` FOREIGN KEY (`building_id`) REFERENCES `buildings` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `fk_users_2` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
- /*!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 (2,'shilefasugba2@gmail.com','$2a$10$hdigALnpcBBNYi8dPH349.MB1rafzcj3eqr88ebIrUlxd9cDfnh6a','',NULL,'2015-04-07 16:00:54','6132055587',1,1,NULL,NULL,NULL,NULL,NULL,'1'),(4,'shile.smartbuildingapps@gmail.com','$2a$10$CoiPRYy3D26rrYpOuy7ElO2i0UU/H9OwKCiGwENMVS.ZKlmHNlfcq',NULL,NULL,'2015-04-08 14:55:17','6477028199',NULL,NULL,'Shile','Fasugba',NULL,NULL,NULL,'1'),(5,'shile2@gmail.com','$2a$10$uKIuC7Cglj4hpEttFUcaXe12BEAYVFkE8zHzUeG/ET1EflFBD3wgK',NULL,NULL,'2015-04-08 15:18:24','6477028199',NULL,NULL,'Shile','Fasugba',NULL,NULL,NULL,'1'),(6,'shile3@gmail.com','$2a$10$Hi69kCQ1O6CX7Xur7/KsnuzIEKhhbnSakqDIZ4qzpmZX1KhNIpJp.',NULL,NULL,'2015-04-09 19:22:18','6558888888',NULL,NULL,'Shile','Fasugba',NULL,NULL,NULL,'1'),(7,'sdfs@bdf.com','$2a$10$wu9LV3C7F0bI/XABhBMnE.4W9T52p1DhTsFaABKwyerVWyfHjqx0a',NULL,NULL,'2015-04-09 19:25:19','3423232333',1,NULL,'sdsd','sdfsl',NULL,NULL,NULL,'1'),(8,'asa@sds.com','$2a$10$Vg2ZMHszDMsWxqxWealDsum3UENTkP74mNIJJFZvZn36mkyoni42i',NULL,NULL,'2015-04-09 20:11:19','3423232333',NULL,NULL,'sdsd','sfsg',NULL,NULL,NULL,'1'),(9,'admin@mail.com','$2a$10$ggkcXw5NIGFXXOtfFIftz.bkL3AjV/jaEMI7XzccOhWj5e9rfZcAq',NULL,NULL,'2015-04-10 15:48:07','6558888888',1,NULL,'sdsd','sdfsl',NULL,NULL,NULL,'1'),(10,'admin22@mail.com','$2a$10$g.8e70zCEoQT3ylNJQB3F.POlrtN/k4f/Q7Yu0iVvdZ9s1mNgc9aO',NULL,NULL,'2015-04-10 16:21:51','3423232333',1,NULL,'sdsd','sdfsl',NULL,NULL,NULL,'1'),(17,'shilefasugba@gmail.com','$2a$10$o6b2tiNDGQZyBq4G/RCwGutn9Wdeh0i.VHujqQuPVWqM3OvGuGb6y',NULL,NULL,'2015-04-10 19:38:53','6477028199',1,1,'Shile','Fasugba',1,'Kx9ASd3P547TxTjS5YTeRQ','2015-04-10 19:38:53','12');
- /*!40000 ALTER TABLE `users` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `vehicles`
- --
- DROP TABLE IF EXISTS `vehicles`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `vehicles` (
- `id` int(11) NOT NULL,
- `name` varchar(45) DEFAULT NULL,
- `license_plate` varchar(45) DEFAULT NULL,
- `make` varchar(45) DEFAULT NULL,
- `model` varchar(145) DEFAULT NULL,
- `year` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Vehicle Prototype -> Parking Requirements might change this';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `vehicles`
- --
- LOCK TABLES `vehicles` WRITE;
- /*!40000 ALTER TABLE `vehicles` DISABLE KEYS */;
- /*!40000 ALTER TABLE `vehicles` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `vendor_categories`
- --
- DROP TABLE IF EXISTS `vendor_categories`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `vendor_categories` (
- `id` int(11) NOT NULL,
- `category_name` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `vendor_categories`
- --
- LOCK TABLES `vendor_categories` WRITE;
- /*!40000 ALTER TABLE `vendor_categories` DISABLE KEYS */;
- /*!40000 ALTER TABLE `vendor_categories` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `vendors`
- --
- DROP TABLE IF EXISTS `vendors`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `vendors` (
- `id` int(11) NOT NULL,
- `name` varchar(45) DEFAULT NULL,
- `building_id` int(11) DEFAULT NULL,
- `vendor_category_id` int(11) DEFAULT NULL,
- `img_path` varchar(145) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_vendors_1_idx` (`vendor_category_id`),
- CONSTRAINT `fk_vendors_1` FOREIGN KEY (`vendor_category_id`) REFERENCES `vendor_categories` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `vendors`
- --
- LOCK TABLES `vendors` WRITE;
- /*!40000 ALTER TABLE `vendors` DISABLE KEYS */;
- /*!40000 ALTER TABLE `vendors` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `work_orders`
- --
- DROP TABLE IF EXISTS `work_orders`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `work_orders` (
- `id` int(11) NOT NULL,
- `maintenance_request_id` int(11) DEFAULT NULL,
- `hours_worked` double DEFAULT NULL,
- `wage_per_hour` int(11) DEFAULT NULL,
- `fixed_wage_amount_bool` tinyint(1) DEFAULT NULL,
- `fixed_wage_amount` double DEFAULT NULL,
- `total_wage_cost` double DEFAULT NULL,
- `total_costs` double DEFAULT NULL,
- `invoice_img_path` varchar(145) DEFAULT NULL,
- `work_order_creator` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_work_orders_1_idx` (`work_order_creator`),
- CONSTRAINT `fk_work_orders_1` FOREIGN KEY (`work_order_creator`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `work_orders`
- --
- LOCK TABLES `work_orders` WRITE;
- /*!40000 ALTER TABLE `work_orders` DISABLE KEYS */;
- /*!40000 ALTER TABLE `work_orders` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `work_orders_expenses`
- --
- DROP TABLE IF EXISTS `work_orders_expenses`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `work_orders_expenses` (
- `id` int(11) NOT NULL,
- `expense_name` varchar(45) DEFAULT NULL,
- `expense_cost` double DEFAULT NULL,
- `work_order_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_work_orders_expenses_1_idx` (`work_order_id`),
- CONSTRAINT `fk_work_orders_expenses_1` FOREIGN KEY (`work_order_id`) REFERENCES `work_orders` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `work_orders_expenses`
- --
- LOCK TABLES `work_orders_expenses` WRITE;
- /*!40000 ALTER TABLE `work_orders_expenses` DISABLE KEYS */;
- /*!40000 ALTER TABLE `work_orders_expenses` 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 2015-04-20 12:58:56
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement