) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `reservation_accessories`
CREATE TABLE `reservation_accessories` (
`series_id` int(10) unsigned NOT NULL,
`accessory_id` smallint(5) unsigned NOT NULL,
`quantity` smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (`series_id`,`accessory_id`),
KEY `accessory_id` (`accessory_id`),
KEY `series_id` (`series_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
-- Table structure for table `reservation_color_rules`
CREATE TABLE `reservation_color_rules` (
`reservation_color_rule_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`custom_attribute_id` mediumint(8) unsigned NOT NULL,
`attribute_type` smallint(5) unsigned DEFAULT NULL,
`comparison_type` smallint(5) unsigned DEFAULT NULL,
`color` varchar(50) DEFAULT NULL,
PRIMARY KEY (`reservation_color_rule_id`),
KEY `custom_attribute_id` (`custom_attribute_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `reservation_files`
CREATE TABLE `reservation_files` (
`file_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`series_id` int(10) unsigned NOT NULL,
`file_name` varchar(250) NOT NULL,
`file_type` varchar(75) DEFAULT NULL,
`file_size` varchar(45) NOT NULL,
`file_extension` varchar(10) NOT NULL,
KEY `series_id` (`series_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `reservation_guests`
CREATE TABLE `reservation_guests` (
`reservation_instance_id` int(10) unsigned NOT NULL,
`email` varchar(255) NOT NULL,
`reservation_user_level` tinyint(2) unsigned NOT NULL,
PRIMARY KEY (`reservation_instance_id`,`email`),
KEY `reservation_guests_reservation_instance_id` (`reservation_instance_id`),
KEY `reservation_guests_email_address` (`email`),
KEY `reservation_guests_reservation_user_level` (`reservation_user_level`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
-- Table structure for table `reservation_instances`
CREATE TABLE `reservation_instances` (
`reservation_instance_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`start_date` datetime NOT NULL,
`end_date` datetime NOT NULL,
`reference_number` varchar(50) NOT NULL,
`series_id` int(10) unsigned NOT NULL,
`checkin_date` datetime DEFAULT NULL,
`checkout_date` datetime DEFAULT NULL,
`previous_end_date` datetime DEFAULT NULL,
`credit_count` decimal(7,2) unsigned DEFAULT NULL,
PRIMARY KEY (`reservation_instance_id`),
KEY `start_date` (`start_date`),
KEY `end_date` (`end_date`),
KEY `reference_number` (`reference_number`),
KEY `series_id` (`series_id`),
KEY `checkin_date` (`checkin_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `reservation_reminders`
CREATE TABLE `reservation_reminders` (
`reminder_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`series_id` int(10) unsigned NOT NULL,
`minutes_prior` int(10) unsigned NOT NULL,
`reminder_type` tinyint(2) unsigned NOT NULL,
PRIMARY KEY (`reminder_id`),
KEY `series_id` (`series_id`),
KEY `reminder_type` (`reminder_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `reservation_resources`
CREATE TABLE `reservation_resources` (
`series_id` int(10) unsigned NOT NULL,
`resource_id` smallint(5) unsigned NOT NULL,
`resource_level_id` tinyint(2) unsigned NOT NULL,
PRIMARY KEY (`series_id`,`resource_id`),
KEY `resource_id` (`resource_id`),
KEY `series_id` (`series_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
-- Table structure for table `reservation_series`
CREATE TABLE `reservation_series` (
`series_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`date_created` datetime NOT NULL,
`last_modified` datetime DEFAULT NULL,
`title` varchar(300) DEFAULT NULL,
`allow_participation` tinyint(1) unsigned NOT NULL,
`allow_anon_participation` tinyint(1) unsigned NOT NULL,
`type_id` tinyint(2) unsigned NOT NULL,
`status_id` tinyint(2) unsigned NOT NULL,
`repeat_type` varchar(10) DEFAULT NULL,
`repeat_options` varchar(255) DEFAULT NULL,
`owner_id` mediumint(8) unsigned NOT NULL,
`legacyid` char(16) DEFAULT NULL,
`last_action_by` mediumint(8) unsigned DEFAULT NULL,
`terms_date_accepted` datetime DEFAULT NULL,
PRIMARY KEY (`series_id`),
KEY `type_id` (`type_id`),
KEY `status_id` (`status_id`),
KEY `reservations_owner` (`owner_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `reservation_statuses`
CREATE TABLE `reservation_statuses` (
`status_id` tinyint(2) unsigned NOT NULL,
`label` varchar(85) NOT NULL,
PRIMARY KEY (`status_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping data for table `reservation_statuses`
INSERT INTO `reservation_statuses` VALUES
-- --------------------------------------------------------
-- Table structure for table `reservation_types`
CREATE TABLE `reservation_types` (
`type_id` tinyint(2) unsigned NOT NULL,
`label` varchar(85) NOT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping data for table `reservation_types`
INSERT INTO `reservation_types` VALUES
-- --------------------------------------------------------
-- Table structure for table `reservation_users`
CREATE TABLE `reservation_users` (
`reservation_instance_id` int(10) unsigned NOT NULL,
`user_id` mediumint(8) unsigned NOT NULL,
`reservation_user_level` tinyint(2) unsigned NOT NULL,
PRIMARY KEY (`reservation_instance_id`,`user_id`),
KEY `reservation_instance_id` (`reservation_instance_id`),
KEY `user_id` (`user_id`),
KEY `reservation_user_level` (`reservation_user_level`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
-- Table structure for table `reservation_waitlist_requests`
CREATE TABLE `reservation_waitlist_requests` (
`reservation_waitlist_request_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`user_id` mediumint(8) unsigned NOT NULL,
`resource_id` smallint(5) unsigned NOT NULL,
`start_date` datetime DEFAULT NULL,
`end_date` datetime DEFAULT NULL,
PRIMARY KEY (`reservation_waitlist_request_id`),
KEY `user_id` (`user_id`),
KEY `resource_id` (`resource_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `resources`
CREATE TABLE `resources` (
`resource_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(85) NOT NULL,
`location` varchar(255) DEFAULT NULL,
`contact_info` varchar(255) DEFAULT NULL,
`min_duration` int(11) DEFAULT NULL,
`min_increment` int(11) DEFAULT NULL,
`max_duration` int(11) DEFAULT NULL,
`unit_cost` decimal(7,2) DEFAULT NULL,
`autoassign` tinyint(1) unsigned NOT NULL DEFAULT '1',
`requires_approval` tinyint(1) unsigned NOT NULL,
`allow_multiday_reservations` tinyint(1) unsigned NOT NULL DEFAULT '1',
`max_participants` mediumint(8) unsigned DEFAULT NULL,
`min_notice_time_add` int(11) DEFAULT NULL,
`max_notice_time` int(11) DEFAULT NULL,
`image_name` varchar(50) DEFAULT NULL,
`schedule_id` smallint(5) unsigned NOT NULL,
`legacyid` char(16) DEFAULT NULL,
`admin_group_id` smallint(5) unsigned DEFAULT NULL,
`public_id` varchar(20) DEFAULT NULL,
`allow_calendar_subscription` tinyint(1) NOT NULL DEFAULT '0',
`sort_order` smallint(5) unsigned DEFAULT NULL,
`resource_type_id` mediumint(8) unsigned DEFAULT NULL,
`status_id` tinyint(3) unsigned NOT NULL DEFAULT '1',
`resource_status_reason_id` smallint(5) unsigned DEFAULT NULL,
`buffer_time` int(10) unsigned DEFAULT NULL,
`enable_check_in` tinyint(1) unsigned NOT NULL DEFAULT '0',
`auto_release_minutes` smallint(5) unsigned DEFAULT NULL,
`color` varchar(10) DEFAULT NULL,
`allow_display` tinyint(1) unsigned NOT NULL DEFAULT '0',
`credit_count` decimal(7,2) unsigned DEFAULT NULL,
`peak_credit_count` decimal(7,2) unsigned DEFAULT NULL,
`min_notice_time_update` int(11) DEFAULT NULL,
`min_notice_time_delete` int(11) DEFAULT NULL,
`date_created` datetime DEFAULT NULL,
`last_modified` datetime DEFAULT NULL,
`additional_properties` text,
PRIMARY KEY (`resource_id`),
UNIQUE KEY `public_id` (`public_id`),
KEY `schedule_id` (`schedule_id`),
KEY `admin_group_id` (`admin_group_id`),
KEY `resource_type_id` (`resource_type_id`),
KEY `resource_status_reason_id` (`resource_status_reason_id`),
KEY `auto_release_minutes` (`auto_release_minutes`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
-- Dumping data for table `resources`
INSERT INTO `resources` VALUES
(1, 'Conference Room 1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, 1, NULL, NULL, NULL, 'resource1.jpg', 1, NULL, NULL, NULL, 0, NULL, NULL, 1, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(2, 'Conference Room 2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, 1, NULL, NULL, NULL, 'resource2.jpg', 1, NULL, NULL, NULL, 0, NULL, NULL, 1, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-- --------------------------------------------------------
-- Table structure for table `resource_accessories`
CREATE TABLE `resource_accessories` (
`resource_accessory_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`resource_id` smallint(5) unsigned NOT NULL,
`accessory_id` smallint(5) unsigned NOT NULL,
`minimum_quantity` smallint(6) DEFAULT NULL,
`maximum_quantity` smallint(6) DEFAULT NULL,
PRIMARY KEY (`resource_accessory_id`),
KEY `resource_id` (`resource_id`),
KEY `accessory_id` (`accessory_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `resource_groups`
CREATE TABLE `resource_groups` (
`resource_group_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`resource_group_name` varchar(75) DEFAULT NULL,
`parent_id` mediumint(8) unsigned DEFAULT NULL,
`public_id` varchar(20) DEFAULT NULL,
PRIMARY KEY (`resource_group_id`),
KEY `resource_groups_parent_id` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `resource_group_assignment`
CREATE TABLE `resource_group_assignment` (
`resource_group_id` mediumint(8) unsigned NOT NULL,
`resource_id` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`resource_group_id`,`resource_id`),
KEY `resource_group_assignment_resource_id` (`resource_id`),
KEY `resource_group_assignment_resource_group_id` (`resource_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
-- Table structure for table `resource_images`
CREATE TABLE `resource_images` (
`resource_image_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`resource_id` smallint(5) unsigned NOT NULL,
`image_name` varchar(50) DEFAULT NULL,
PRIMARY KEY (`resource_image_id`),
KEY `resource_id` (`resource_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `resource_status_reasons`
CREATE TABLE `resource_status_reasons` (
`resource_status_reason_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`status_id` tinyint(3) unsigned NOT NULL,
`description` varchar(100) DEFAULT NULL,
PRIMARY KEY (`resource_status_reason_id`),
KEY `status_id` (`status_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `resource_types`
CREATE TABLE `resource_types` (
`resource_type_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`resource_type_name` varchar(75) DEFAULT NULL,
`resource_type_description` text,
PRIMARY KEY (`resource_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `resource_type_assignment`
CREATE TABLE `resource_type_assignment` (
`resource_id` smallint(5) unsigned NOT NULL,
`resource_type_id` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`resource_id`,`resource_type_id`),
KEY `resource_type_id` (`resource_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
-- Table structure for table `roles`
`role_id` tinyint(2) unsigned NOT NULL,
`name` varchar(85) DEFAULT NULL,
`role_level` tinyint(2) unsigned DEFAULT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping data for table `roles`
INSERT INTO `roles` VALUES
(2, 'Application Admin', 2),
(3, 'Resource Admin', 3),
(4, 'Schedule Admin', 4);
-- --------------------------------------------------------
-- Table structure for table `saved_reports`
CREATE TABLE `saved_reports` (
`saved_report_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`report_name` varchar(50) DEFAULT NULL,
`user_id` mediumint(8) unsigned NOT NULL,
`date_created` datetime NOT NULL,
`report_details` varchar(500) NOT NULL,
PRIMARY KEY (`saved_report_id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `schedules`
CREATE TABLE `schedules` (
`schedule_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(85) NOT NULL,
`isdefault` tinyint(1) unsigned NOT NULL,
`weekdaystart` tinyint(2) unsigned NOT NULL,
`daysvisible` tinyint(2) unsigned NOT NULL DEFAULT '7',
`layout_id` mediumint(8) unsigned NOT NULL,
`legacyid` char(16) DEFAULT NULL,
`public_id` varchar(20) DEFAULT NULL,
`allow_calendar_subscription` tinyint(1) NOT NULL DEFAULT '0',
`admin_group_id` smallint(5) unsigned DEFAULT NULL,
`start_date` datetime DEFAULT NULL,
`end_date` datetime DEFAULT NULL,
`allow_concurrent_bookings` tinyint(1) unsigned NOT NULL DEFAULT '0',
`default_layout` tinyint(4) NOT NULL DEFAULT '0',
`total_concurrent_reservations` smallint(5) unsigned NOT NULL DEFAULT '0',
`max_resources_per_reservation` smallint(5) unsigned NOT NULL DEFAULT '0',
`additional_properties` text,
PRIMARY KEY (`schedule_id`),
UNIQUE KEY `public_id` (`public_id`),
KEY `layout_id` (`layout_id`),
KEY `schedules_groups_admin_group_id` (`admin_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
-- Dumping data for table `schedules`
INSERT INTO `schedules` VALUES
(1, 'Default', 1, 0, 7, 1, NULL, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, NULL);
-- --------------------------------------------------------
-- Table structure for table `terms_of_service`
CREATE TABLE `terms_of_service` (
`terms_of_service_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`terms_url` varchar(255) DEFAULT NULL,
`terms_file` varchar(50) DEFAULT NULL,
`applicability` varchar(50) DEFAULT NULL,
`date_created` datetime NOT NULL,
PRIMARY KEY (`terms_of_service_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `time_blocks`
CREATE TABLE `time_blocks` (
`block_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`label` varchar(85) DEFAULT NULL,
`end_label` varchar(85) DEFAULT NULL,
`availability_code` tinyint(2) unsigned NOT NULL,
`layout_id` mediumint(8) unsigned NOT NULL,
`start_time` time NOT NULL,
`end_time` time NOT NULL,
`day_of_week` smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (`block_id`),
KEY `layout_id` (`layout_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=23 ;
-- Dumping data for table `time_blocks`