SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!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 */;
-- --------------------------------------------------------
-- Table structure for table `accessories`
CREATE TABLE `accessories` (
`accessory_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`accessory_name` varchar(85) NOT NULL,
`accessory_quantity` smallint(5) unsigned DEFAULT NULL,
`legacyid` char(16) DEFAULT NULL,
PRIMARY KEY (`accessory_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
-- Dumping data for table `accessories`
INSERT INTO `accessories` VALUES
(1, 'accessory limited to 10', 10, NULL),
(2, 'accessory limited to 2', 2, NULL),
(3, 'unlimited accessory', NULL, NULL);
-- --------------------------------------------------------
-- Table structure for table `account_activation`
CREATE TABLE `account_activation` (
`account_activation_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`user_id` mediumint(8) unsigned NOT NULL,
`activation_code` varchar(30) NOT NULL,
`date_created` datetime NOT NULL,
PRIMARY KEY (`account_activation_id`),
UNIQUE KEY `activation_code_2` (`activation_code`),
KEY `activation_code` (`activation_code`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `announcements`
CREATE TABLE `announcements` (
`announcementid` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`announcement_text` text NOT NULL,
`priority` mediumint(8) DEFAULT NULL,
`start_date` datetime DEFAULT NULL,
`end_date` datetime DEFAULT NULL,
`display_page` tinyint(1) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`announcementid`),
KEY `start_date` (`start_date`),
KEY `end_date` (`end_date`),
KEY `display_page` (`display_page`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `announcement_groups`
CREATE TABLE `announcement_groups` (
`announcementid` mediumint(8) unsigned NOT NULL,
`group_id` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`announcementid`,`group_id`),
KEY `group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
-- Table structure for table `announcement_resources`
CREATE TABLE `announcement_resources` (
`announcementid` mediumint(8) unsigned NOT NULL,
`resource_id` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`announcementid`,`resource_id`),
KEY `resource_id` (`resource_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
-- Table structure for table `blackout_instances`
CREATE TABLE `blackout_instances` (
`blackout_instance_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`start_date` datetime NOT NULL,
`end_date` datetime NOT NULL,
`blackout_series_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`blackout_instance_id`),
KEY `start_date` (`start_date`),
KEY `end_date` (`end_date`),
KEY `blackout_series_id` (`blackout_series_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `blackout_series`
CREATE TABLE `blackout_series` (
`blackout_series_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`date_created` datetime NOT NULL,
`last_modified` datetime DEFAULT NULL,
`title` varchar(85) NOT NULL,
`owner_id` mediumint(8) unsigned NOT NULL,
`legacyid` char(16) DEFAULT NULL,
`repeat_type` varchar(10) DEFAULT NULL,
`repeat_options` varchar(255) DEFAULT NULL,
PRIMARY KEY (`blackout_series_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `blackout_series_resources`
CREATE TABLE `blackout_series_resources` (
`blackout_series_id` int(10) unsigned NOT NULL,
`resource_id` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`blackout_series_id`,`resource_id`),
KEY `resource_id` (`resource_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
-- Table structure for table `credit_log`
CREATE TABLE `credit_log` (
`credit_log_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` mediumint(8) unsigned NOT NULL,
`original_credit_count` decimal(7,2) DEFAULT NULL,
`credit_count` decimal(7,2) DEFAULT NULL,
`credit_note` varchar(1000) DEFAULT NULL,
`date_created` datetime NOT NULL,
PRIMARY KEY (`credit_log_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `custom_attributes`
CREATE TABLE `custom_attributes` (
`custom_attribute_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`display_label` varchar(50) NOT NULL,
`display_type` tinyint(2) unsigned NOT NULL,
`attribute_category` tinyint(2) unsigned NOT NULL,
`validation_regex` varchar(50) DEFAULT NULL,
`is_required` tinyint(1) unsigned NOT NULL,
`sort_order` tinyint(2) unsigned DEFAULT NULL,
`admin_only` tinyint(1) unsigned DEFAULT NULL,
`secondary_category` tinyint(2) unsigned DEFAULT NULL,
`secondary_entity_ids` varchar(2000) DEFAULT NULL,
`is_private` tinyint(1) unsigned DEFAULT NULL,
PRIMARY KEY (`custom_attribute_id`),
KEY `attribute_category` (`attribute_category`),
KEY `display_label` (`display_label`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
-- Dumping data for table `custom_attributes`
INSERT INTO `custom_attributes` VALUES
(1, 'Test Number', 1, 1, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL),
(2, 'Test String', 1, 1, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL),
(3, 'Test Number', 1, 4, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL),
(4, 'Test String', 1, 4, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
-- --------------------------------------------------------
-- Table structure for table `custom_attribute_entities`
CREATE TABLE `custom_attribute_entities` (
`custom_attribute_id` mediumint(8) unsigned NOT NULL,
`entity_id` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`custom_attribute_id`,`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
-- Table structure for table `custom_attribute_values`
CREATE TABLE `custom_attribute_values` (
`custom_attribute_value_id` int(8) unsigned NOT NULL AUTO_INCREMENT,
`custom_attribute_id` mediumint(8) unsigned NOT NULL,
`attribute_value` text NOT NULL,
`entity_id` mediumint(8) unsigned NOT NULL,
`attribute_category` tinyint(2) unsigned NOT NULL,
PRIMARY KEY (`custom_attribute_value_id`),
KEY `custom_attribute_id` (`custom_attribute_id`),
KEY `entity_id` (`entity_id`),
KEY `attribute_category` (`attribute_category`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `custom_time_blocks`
CREATE TABLE `custom_time_blocks` (
`custom_time_block_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`start_time` datetime NOT NULL,
`end_time` datetime NOT NULL,
`layout_id` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`custom_time_block_id`),
KEY `layout_id` (`layout_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `dbversion`
CREATE TABLE `dbversion` (
`version_number` double unsigned NOT NULL DEFAULT '0',
`version_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping data for table `dbversion`
INSERT INTO `dbversion` VALUES
-- --------------------------------------------------------
-- Table structure for table `groups`
`group_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(85) NOT NULL,
`admin_group_id` smallint(5) unsigned DEFAULT NULL,
`legacyid` char(16) DEFAULT NULL,
`isdefault` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`group_id`),
KEY `admin_group_id` (`admin_group_id`),
KEY `isdefault` (`isdefault`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
-- Dumping data for table `groups`
INSERT INTO `groups` VALUES
(1, 'Group Administrators', NULL, NULL, 0),
(2, 'Application Administrators', NULL, NULL, 0),
(3, 'Resource Administrators', NULL, NULL, 0),
(4, 'Schedule Administrators', NULL, NULL, 0);
-- --------------------------------------------------------
-- Table structure for table `group_resource_permissions`
CREATE TABLE `group_resource_permissions` (
`group_id` smallint(5) unsigned NOT NULL,
`resource_id` smallint(5) unsigned NOT NULL,
`permission_type` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`group_id`,`resource_id`),
KEY `group_id` (`group_id`),
KEY `resource_id` (`resource_id`),
KEY `group_id_2` (`group_id`),
KEY `resource_id_2` (`resource_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
-- Table structure for table `group_roles`
CREATE TABLE `group_roles` (
`group_id` smallint(8) unsigned NOT NULL,
`role_id` tinyint(2) unsigned NOT NULL,
PRIMARY KEY (`group_id`,`role_id`),
KEY `group_id` (`group_id`),
KEY `role_id` (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping data for table `group_roles`
INSERT INTO `group_roles` VALUES
-- --------------------------------------------------------
-- Table structure for table `layouts`
`layout_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`timezone` varchar(50) NOT NULL,
`layout_type` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`layout_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
-- Dumping data for table `layouts`
INSERT INTO `layouts` VALUES
(1, 'America/New_York', 0);
-- --------------------------------------------------------
-- Table structure for table `payment_configuration`
CREATE TABLE `payment_configuration` (
`payment_configuration_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`credit_cost` decimal(7,2) unsigned NOT NULL,
`credit_currency` varchar(10) NOT NULL,
PRIMARY KEY (`payment_configuration_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
-- Dumping data for table `payment_configuration`
INSERT INTO `payment_configuration` VALUES
-- --------------------------------------------------------
-- Table structure for table `payment_gateway_settings`
CREATE TABLE `payment_gateway_settings` (
`gateway_type` varchar(255) NOT NULL,
`setting_name` varchar(255) NOT NULL,
`setting_value` varchar(1000) NOT NULL,
PRIMARY KEY (`gateway_type`,`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
-- Table structure for table `payment_transaction_log`
CREATE TABLE `payment_transaction_log` (
`payment_transaction_log_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` mediumint(8) unsigned NOT NULL,
`status` varchar(255) NOT NULL,
`invoice_number` varchar(50) DEFAULT NULL,
`transaction_id` varchar(50) NOT NULL,
`subtotal_amount` decimal(7,2) NOT NULL,
`tax_amount` decimal(7,2) NOT NULL,
`total_amount` decimal(7,2) NOT NULL,
`transaction_fee` decimal(7,2) DEFAULT NULL,
`currency` varchar(3) NOT NULL,
`transaction_href` varchar(500) DEFAULT NULL,
`refund_href` varchar(500) DEFAULT NULL,
`date_created` datetime NOT NULL,
`gateway_name` varchar(100) NOT NULL,
`gateway_date_created` varchar(25) NOT NULL,
PRIMARY KEY (`payment_transaction_log_id`),
KEY `user_id` (`user_id`),
KEY `invoice_number` (`invoice_number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `peak_times`
CREATE TABLE `peak_times` (
`peak_times_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`schedule_id` smallint(5) unsigned NOT NULL,
`all_day` tinyint(1) unsigned NOT NULL,
`start_time` varchar(10) DEFAULT NULL,
`end_time` varchar(10) DEFAULT NULL,
`every_day` tinyint(1) unsigned NOT NULL,
`peak_days` varchar(13) DEFAULT NULL,
`all_year` tinyint(1) unsigned NOT NULL,
`begin_month` tinyint(1) unsigned NOT NULL,
`begin_day` tinyint(1) unsigned NOT NULL,
`end_month` tinyint(1) unsigned NOT NULL,
`end_day` tinyint(1) unsigned NOT NULL,
PRIMARY KEY (`peak_times_id`),
KEY `schedule_id` (`schedule_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `quotas`
`quota_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`quota_limit` decimal(7,2) unsigned NOT NULL,
`unit` varchar(25) NOT NULL,
`duration` varchar(25) NOT NULL,
`resource_id` smallint(5) unsigned DEFAULT NULL,
`group_id` smallint(5) unsigned DEFAULT NULL,
`schedule_id` smallint(5) unsigned DEFAULT NULL,
`enforced_days` varchar(15) DEFAULT NULL,
`enforced_time_start` time DEFAULT NULL,
`enforced_time_end` time DEFAULT NULL,
`scope` varchar(25) DEFAULT NULL,
PRIMARY KEY (`quota_id`),
KEY `resource_id` (`resource_id`),
KEY `group_id` (`group_id`),
KEY `schedule_id` (`schedule_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `refund_transaction_log`
CREATE TABLE `refund_transaction_log` (
`refund_transaction_log_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`payment_transaction_log_id` int(10) unsigned NOT NULL,
`status` varchar(255) NOT NULL,
`transaction_id` varchar(50) DEFAULT NULL,
`total_refund_amount` decimal(7,2) NOT NULL,
`payment_refund_amount` decimal(7,2) DEFAULT NULL,
`fee_refund_amount` decimal(7,2) DEFAULT NULL,
`transaction_href` varchar(500) DEFAULT NULL,
`date_created` datetime NOT NULL,
`gateway_date_created` varchar(25) NOT NULL,
PRIMARY KEY (`refund_transaction_log_id`),
KEY `payment_transaction_log_id` (`payment_transaction_log_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `reminders`
CREATE TABLE `reminders` (
`reminder_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` mediumint(8) unsigned NOT NULL,
`sendtime` datetime NOT NULL,
`refnumber` text NOT NULL,
PRIMARY KEY (`reminder_id`),
KEY `reminders_user_id` (`user_id`)