-- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Sep 21, 2017 at 01:56 PM -- Server version: 5.5.55-cll -- PHP Version: 5.6.30 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 utf8mb4 */; -- -- Database: `kavintec_bparc` -- -- -------------------------------------------------------- -- -- Table structure for table `events` -- CREATE TABLE `events` ( `id` int(11) NOT NULL, `title` varchar(255) NOT NULL, `color` varchar(7) DEFAULT NULL, `start` datetime NOT NULL, `end` datetime DEFAULT NULL, `uname` varchar(500) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `events` -- INSERT INTO `events` (`id`, `title`, `color`, `start`, `end`, `uname`) VALUES (1, 'calender', '#FFD700', '2017-08-11 00:00:00', '2017-08-12 00:00:00', 'hema'), (8, 'xfdsfds', '#FF8C00', '2017-08-17 00:00:00', '2017-08-18 00:00:00', 'sam'), (11, 'sdf', '', '2017-08-11 00:00:00', '2017-08-12 00:00:00', 'hema'), (13, 'Sample demo', '#000', '2017-08-09 00:00:00', '2017-08-10 00:00:00', 'hema'), (15, 'Sample', '#FF0000', '2017-09-01 00:00:00', '2017-09-02 00:00:00', 'hema'), (17, 'BBQ', '#FF8C00', '2017-09-10 00:00:00', '2017-09-11 00:00:00', 'Hema'), (18, 'BBQ', '#0071c5', '2017-09-12 00:00:00', '2017-09-13 00:00:00', 'hema'), (20, 'BBQ', '#008000', '2017-09-19 00:00:00', '2017-09-20 00:00:00', 'hema'), (21, 'BBQ', '#0071c5', '2017-09-12 00:00:00', '2017-09-13 00:00:00', 'admin'), (22, 'Futsal', '#0071c5', '2017-09-18 00:00:00', '2017-09-19 00:00:00', 'admin'); -- -------------------------------------------------------- -- -- Table structure for table `holidays` -- CREATE TABLE `holidays` ( `id` int(11) NOT NULL, `title` varchar(255) NOT NULL, `color` varchar(7) DEFAULT NULL, `start` datetime NOT NULL, `end` datetime DEFAULT NULL, `uname` varchar(500) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `holidays` -- INSERT INTO `holidays` (`id`, `title`, `color`, `start`, `end`, `uname`) VALUES (1, 'National Day', '#0c7f00', '2017-08-09 00:00:00', '2017-08-09 00:00:00', ''), (2, 'New Year’s Day ', '#0c7f00', '2017-01-01 00:00:00', '2017-01-01 00:00:00', 'admin'), (3, 'Chinese New Year', '#0c7f00', '2017-01-28 00:00:00', '2017-01-29 00:00:00', 'admin'), (4, 'Good Friday', '#0c7f00', '2017-04-14 00:00:00', '2017-04-14 00:00:00', 'admin'), (5, 'Labour Day ', '#0c7f00', '2017-05-01 00:00:00', '2017-05-01 00:00:00', 'admin'), (6, 'Vesak Day ', '#0c7f00', '2017-05-10 00:00:00', '2017-05-10 00:00:00', 'admin'), (7, 'Hari Raya Puasa ', '#0c7f00', '2017-06-25 00:00:00', '2017-06-25 00:00:00', 'admin'), (8, 'Hari Raya Haji ', '#0c7f00', '2017-09-01 00:00:00', '2017-09-01 00:00:00', 'admin'), (9, 'Deepavali ', '#0c7f00', '2017-10-28 00:00:00', '2017-10-18 00:00:00', 'admin'), (10, 'Christmas ', '#0c7f00', '2017-12-25 00:00:00', '2017-12-25 00:00:00', 'admin'), (11, 'New Year’s Day', '#0c7f00', '2018-01-01 00:00:00', '2018-01-01 00:00:00', 'admin'), (12, 'Chinese New Year', '#0c7f00', '2018-02-16 00:00:00', '2018-02-17 00:00:00', 'admin'), (13, 'Good Friday', '#0c7f00', '2018-03-30 00:00:00', '2018-03-31 00:00:00', 'admin'), (14, 'Labour Day', '#0c7f00', '2018-05-01 00:00:00', '2018-03-01 00:00:00', 'admin'), (15, 'Vesak Day', '#0c7f00', '2018-05-29 00:00:00', '2018-05-29 00:00:00', 'admin'), (16, 'Hari Raya Puasa', '#0c7f00', '2018-06-15 00:00:00', '2018-06-15 00:00:00', 'admin'), (17, 'National Day', '#0c7f00', '2018-08-09 00:00:00', '2018-08-09 00:00:00', 'admin'), (18, 'Hari Raya Haji', '#0c7f00', '2018-08-22 00:00:00', '2018-08-22 00:00:00', 'admin'), (19, 'Deepavali', '#0c7f00', '2018-11-06 00:00:00', '2018-11-06 00:00:00', 'admin'), (20, 'Christmas Day', '#0c7f00', '2018-12-25 00:00:00', '2018-12-25 00:00:00', 'admin'); -- -------------------------------------------------------- -- -- Table structure for table `login` -- CREATE TABLE `login` ( `id` int(50) NOT NULL, `username` varchar(500) NOT NULL, `password` varchar(500) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `login` -- INSERT INTO `login` (`id`, `username`, `password`) VALUES (1, 'hema', 'hema'), (7, 'Ram', 'test'), (6, 'admin', 'admin'), (5, 'Hello', 'sfdsf'), (8, 'Ram', '1234'), (9, 'Ram', '12345'); -- -------------------------------------------------------- -- -- Table structure for table `pec_admin_user_cals` -- CREATE TABLE `pec_admin_user_cals` ( `admin_id` int(11) UNSIGNED NOT NULL DEFAULT '0', `cal_id` int(11) UNSIGNED NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `pec_calendars` -- CREATE TABLE `pec_calendars` ( `id` int(11) UNSIGNED NOT NULL, `type` enum('user','group','url') DEFAULT 'user', `user_id` int(11) UNSIGNED DEFAULT NULL, `name` varchar(100) DEFAULT NULL, `description` text, `color` varchar(7) DEFAULT NULL, `admin_id` int(11) DEFAULT NULL, `status` enum('on','off') DEFAULT 'on', `show_in_list` enum('0','1') DEFAULT NULL, `public` tinyint(3) UNSIGNED DEFAULT '0', `reminder_message_email` text, `reminder_message_popup` text, `access_key` varchar(32) DEFAULT NULL COMMENT 'ical subscribe access key', `created_on` datetime DEFAULT NULL, `updated_on` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `pec_calendars` -- INSERT INTO `pec_calendars` (`id`, `type`, `user_id`, `name`, `description`, `color`, `admin_id`, `status`, `show_in_list`, `public`, `reminder_message_email`, `reminder_message_popup`, `access_key`, `created_on`, `updated_on`) VALUES (1, 'user', 1, 'Default Calendar', 'This is a default calendar', '#E67B2D', NULL, 'on', '1', 1, '', '', '', '2014-03-20 00:00:00', NULL), (2, 'group', 1, 'Event', 'Event Calender', '#6ABA2E', NULL, 'on', '1', 1, NULL, NULL, NULL, NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `pec_default_reminders` -- CREATE TABLE `pec_default_reminders` ( `id` int(11) UNSIGNED NOT NULL, `user_id` int(11) UNSIGNED DEFAULT NULL, `cal_id` int(11) UNSIGNED DEFAULT NULL, `type` enum('email','popup') DEFAULT NULL, `time` smallint(6) DEFAULT NULL, `time_type` enum('minute','hour','day','week') DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `pec_events` -- CREATE TABLE `pec_events` ( `id` int(10) UNSIGNED NOT NULL, `cal_id` int(10) UNSIGNED DEFAULT NULL, `type` enum('standard','multi_day') DEFAULT NULL, `start_date` date DEFAULT NULL, `start_time` char(5) DEFAULT NULL, `start_timestamp` int(10) UNSIGNED DEFAULT NULL, `end_date` date DEFAULT NULL, `end_time` char(5) DEFAULT NULL, `end_timestamp` int(10) UNSIGNED DEFAULT NULL, `repeat_type` enum('none','daily','everyWeekDay','everyMWFDay','everyTTDay','weekly','monthly','yearly') DEFAULT 'none', `repeat_interval` tinyint(3) UNSIGNED DEFAULT NULL, `repeat_count` tinyint(3) UNSIGNED DEFAULT '0', `repeat_start_date` date DEFAULT '0000-01-01', `repeat_end_on` date DEFAULT '0000-01-01', `repeat_end_after` int(11) DEFAULT '0', `repeat_never` tinyint(1) DEFAULT '0', `repeat_by` enum('repeat_by_day_of_the_month','repeat_by_day_of_the_week') DEFAULT NULL, `repeat_on_sun` tinyint(1) NOT NULL DEFAULT '0', `repeat_on_mon` tinyint(1) NOT NULL DEFAULT '0', `repeat_on_tue` tinyint(1) NOT NULL DEFAULT '0', `repeat_on_wed` tinyint(1) NOT NULL DEFAULT '0', `repeat_on_thu` tinyint(1) NOT NULL DEFAULT '0', `repeat_on_fri` tinyint(1) NOT NULL DEFAULT '0', `repeat_on_sat` tinyint(1) NOT NULL DEFAULT '0', `repeat_deleted_indexes` varchar(255) DEFAULT NULL, `title` text, `description` longblob, `allDay` varchar(10) DEFAULT NULL, `url` varchar(256) DEFAULT NULL, `color` varchar(15) DEFAULT NULL, `backgroundColor` varchar(20) DEFAULT NULL, `textColor` varchar(20) DEFAULT NULL, `borderColor` varchar(20) DEFAULT NULL, `location` varchar(255) DEFAULT NULL, `available` enum('0','1') DEFAULT '1', `privacy` enum('public','private') DEFAULT 'public', `image` varchar(100) DEFAULT NULL, `invitation` enum('1','0') DEFAULT '0', `invitation_event_id` int(10) UNSIGNED DEFAULT '0', `invitation_creator_id` int(10) UNSIGNED DEFAULT '0', `invitation_response` enum('yes','no','maybe','pending') DEFAULT 'pending', `free_busy` enum('free','busy') NOT NULL, `created_by` varchar(30) DEFAULT NULL, `modified_by` varchar(30) DEFAULT NULL, `created_on` varchar(19) DEFAULT NULL, `updated_on` varchar(19) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `pec_events` -- INSERT INTO `pec_events` (`id`, `cal_id`, `type`, `start_date`, `start_time`, `start_timestamp`, `end_date`, `end_time`, `end_timestamp`, `repeat_type`, `repeat_interval`, `repeat_count`, `repeat_start_date`, `repeat_end_on`, `repeat_end_after`, `repeat_never`, `repeat_by`, `repeat_on_sun`, `repeat_on_mon`, `repeat_on_tue`, `repeat_on_wed`, `repeat_on_thu`, `repeat_on_fri`, `repeat_on_sat`, `repeat_deleted_indexes`, `title`, `description`, `allDay`, `url`, `color`, `backgroundColor`, `textColor`, `borderColor`, `location`, `available`, `privacy`, `image`, `invitation`, `invitation_event_id`, `invitation_creator_id`, `invitation_response`, `free_busy`, `created_by`, `modified_by`, `created_on`, `updated_on`) VALUES (9, 1, NULL, '2017-08-05', '12:00', 1501905600, '2017-08-05', '23:30', 1501947000, 'none', NULL, 0, '0000-01-01', '0000-01-01', 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, 'BBQ Scheduler', NULL, '', NULL, NULL, '#E67B2D', NULL, '#E67B2D', NULL, '1', 'public', NULL, '0', 0, 0, 'pending', 'free', NULL, NULL, NULL, NULL), (10, 1, NULL, '2017-08-09', '15:30', 1502263800, '2017-08-09', '16:30', 1502267400, 'none', NULL, 0, '0000-01-01', '0000-01-01', 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, 'uhujtyu', NULL, '', NULL, NULL, '#E67B2D', NULL, '#E67B2D', NULL, '1', 'public', NULL, '0', 0, 0, 'pending', 'free', NULL, NULL, NULL, NULL), (16, 2, NULL, '2017-08-09', '16:00', 1502265600, '2017-08-09', '17:00', 1502269200, 'none', NULL, 0, '0000-01-01', '0000-01-01', 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, 'testing', NULL, '', NULL, NULL, '#6ABA2E', NULL, '#6ABA2E', NULL, '1', 'public', NULL, '0', 0, 0, 'pending', 'free', NULL, NULL, NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `pec_event_calendar_settings` -- CREATE TABLE `pec_event_calendar_settings` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED DEFAULT NULL, `domain` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `pec_guests` -- CREATE TABLE `pec_guests` ( `id` int(10) UNSIGNED NOT NULL, `event_id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `username` varchar(30) DEFAULT NULL, `email` varchar(100) DEFAULT NULL, `response` enum('yes','no','maybe','pending') DEFAULT 'pending', `note` varchar(255) DEFAULT NULL, `user_guest_count` tinyint(3) UNSIGNED DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `pec_mobile_calendar_settings` -- CREATE TABLE `pec_mobile_calendar_settings` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED DEFAULT NULL, `theme` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `pec_reminders` -- CREATE TABLE `pec_reminders` ( `id` int(11) NOT NULL, `event_id` int(11) UNSIGNED DEFAULT NULL, `is_repeating_event` enum('0','1') DEFAULT '0', `type` enum('email','popup') DEFAULT NULL, `time` int(11) DEFAULT NULL, `time_unit` enum('minute','hour','day','week') DEFAULT NULL, `ts` timestamp NULL DEFAULT NULL, `remind_time` char(5) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `pec_settings` -- CREATE TABLE `pec_settings` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED DEFAULT NULL, `admin_id` int(10) UNSIGNED DEFAULT NULL, `shortdate_format` varchar(20) DEFAULT NULL, `longdate_format` varchar(20) DEFAULT NULL, `timeformat` enum('core','standard') DEFAULT NULL, `custom_view` tinyint(3) UNSIGNED DEFAULT NULL, `start_day` tinyint(1) DEFAULT '0', `default_view` varchar(20) DEFAULT NULL, `wysiwyg` enum('1','0') DEFAULT '0', `staff_mode` enum('0','1') DEFAULT '0', `calendar_mode` enum('vertical','timeline') DEFAULT 'vertical', `timeline_day_width` mediumint(8) UNSIGNED DEFAULT '360', `timeline_row_height` mediumint(8) UNSIGNED DEFAULT '28', `timeline_show_hours` tinyint(3) UNSIGNED DEFAULT '1', `timeline_mode` enum('horizontal','vertical') DEFAULT 'horizontal', `week_cal_timeslot_min` mediumint(8) UNSIGNED DEFAULT '30', `timeslot_height` tinyint(3) UNSIGNED DEFAULT '20', `week_cal_start_time` char(5) DEFAULT '00:00', `week_cal_end_time` char(5) DEFAULT '23:00', `week_cal_show_hours` tinyint(3) UNSIGNED DEFAULT '1', `event_tooltip` tinyint(3) UNSIGNED DEFAULT '1', `left_side_visible` tinyint(3) UNSIGNED DEFAULT '1', `language` varchar(64) DEFAULT 'English', `time_zone` varchar(4) DEFAULT '-12', `email_server` enum('PHPMailer','SendGrid') DEFAULT 'PHPMailer' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `pec_settings` -- INSERT INTO `pec_settings` (`id`, `user_id`, `admin_id`, `shortdate_format`, `longdate_format`, `timeformat`, `custom_view`, `start_day`, `default_view`, `wysiwyg`, `staff_mode`, `calendar_mode`, `timeline_day_width`, `timeline_row_height`, `timeline_show_hours`, `timeline_mode`, `week_cal_timeslot_min`, `timeslot_height`, `week_cal_start_time`, `week_cal_end_time`, `week_cal_show_hours`, `event_tooltip`, `left_side_visible`, `language`, `time_zone`, `email_server`) VALUES (1, 1, NULL, 'DD/MM/YYYY', 'dddd, DD MMMM YYYY', 'core', NULL, 0, 'month', '0', '0', 'vertical', 360, 28, 1, 'horizontal', 30, 20, '00:00', '23:00', 1, 1, 1, 'English', '-12', 'PHPMailer'); -- -------------------------------------------------------- -- -- Table structure for table `pec_shared_calendars` -- CREATE TABLE `pec_shared_calendars` ( `id` int(11) UNSIGNED NOT NULL, `type` enum('user','group','url') DEFAULT 'user', `user_id` int(11) UNSIGNED DEFAULT NULL, `cal_id` int(11) UNSIGNED DEFAULT NULL, `shared_user_id` int(11) DEFAULT NULL, `permission` enum('see','change') DEFAULT NULL, `name` varchar(50) DEFAULT NULL, `description` text, `color` varchar(7) DEFAULT NULL, `status` enum('on','off') DEFAULT 'on', `show_in_list` enum('0','1') DEFAULT NULL, `url` varchar(255) DEFAULT NULL, `created_on` datetime DEFAULT NULL, `updated_on` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `pec_users` -- CREATE TABLE `pec_users` ( `id` int(10) UNSIGNED NOT NULL, `access_key` varchar(32) DEFAULT NULL, `activated` tinyint(3) UNSIGNED DEFAULT '1', `admin_id` int(10) UNSIGNED DEFAULT NULL, `role` enum('super','admin','user') DEFAULT NULL, `first_name` varchar(50) DEFAULT NULL, `last_name` varchar(50) DEFAULT NULL, `active_calendar_id` varchar(512) NOT NULL DEFAULT '0', `company` varchar(50) DEFAULT NULL, `username` varchar(100) DEFAULT NULL, `password` varchar(64) DEFAULT NULL, `email` varchar(100) DEFAULT NULL, `timezone` varchar(30) DEFAULT NULL, `language` varchar(10) DEFAULT NULL, `theme` varchar(20) DEFAULT NULL, `kbd_shortcuts` tinyint(3) UNSIGNED DEFAULT '1', `created_on` datetime DEFAULT NULL, `updated_on` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `pec_users` -- INSERT INTO `pec_users` (`id`, `access_key`, `activated`, `admin_id`, `role`, `first_name`, `last_name`, `active_calendar_id`, `company`, `username`, `password`, `email`, `timezone`, `language`, `theme`, `kbd_shortcuts`, `created_on`, `updated_on`) VALUES (1, '1', 1, 1, 'super', 'Admin', 'Admin', '1,2', 'Higpitch', 'admin', 'e10adc3949ba59abbe56e057f20f883e', 'admin@gmail.com', '+6', 'English', 'default', 1, '2013-12-18 14:27:41', '2013-12-18 14:27:45'); -- -------------------------------------------------------- -- -- Table structure for table `pec_user_permissions` -- CREATE TABLE `pec_user_permissions` ( `user_id` int(10) UNSIGNED NOT NULL, `permission` varchar(100) NOT NULL, `value` enum('0','1') DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `pec_user_share_free_busy` -- CREATE TABLE `pec_user_share_free_busy` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(11) UNSIGNED DEFAULT NULL, `shared_user_id` int(11) UNSIGNED DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Indexes for dumped tables -- -- -- Indexes for table `events` -- ALTER TABLE `events` ADD PRIMARY KEY (`id`); -- -- Indexes for table `holidays` -- ALTER TABLE `holidays` ADD PRIMARY KEY (`id`); -- -- Indexes for table `login` -- ALTER TABLE `login` ADD PRIMARY KEY (`id`); -- -- Indexes for table `pec_admin_user_cals` -- ALTER TABLE `pec_admin_user_cals` ADD PRIMARY KEY (`admin_id`,`cal_id`); -- -- Indexes for table `pec_calendars` -- ALTER TABLE `pec_calendars` ADD PRIMARY KEY (`id`), ADD KEY `fk_user_id` (`user_id`); -- -- Indexes for table `pec_default_reminders` -- ALTER TABLE `pec_default_reminders` ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`), ADD KEY `cal_id` (`cal_id`); -- -- Indexes for table `pec_events` -- ALTER TABLE `pec_events` ADD PRIMARY KEY (`id`), ADD KEY `cal_id` (`cal_id`,`type`,`start_date`), ADD KEY `cal_id_2` (`cal_id`,`type`,`end_date`), ADD KEY `cal_id_3` (`cal_id`,`type`,`start_date`,`end_date`), ADD KEY `cal_id_4` (`cal_id`,`start_date`), ADD KEY `cal_id_5` (`cal_id`,`end_date`), ADD KEY `cal_id_6` (`cal_id`,`start_date`,`end_date`); -- -- Indexes for table `pec_event_calendar_settings` -- ALTER TABLE `pec_event_calendar_settings` ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`); -- -- Indexes for table `pec_guests` -- ALTER TABLE `pec_guests` ADD PRIMARY KEY (`id`), ADD KEY `i_event_id` (`event_id`), ADD KEY `user_id` (`user_id`); -- -- Indexes for table `pec_mobile_calendar_settings` -- ALTER TABLE `pec_mobile_calendar_settings` ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`); -- -- Indexes for table `pec_reminders` -- ALTER TABLE `pec_reminders` ADD PRIMARY KEY (`id`), ADD KEY `i_event_id` (`event_id`); -- -- Indexes for table `pec_settings` -- ALTER TABLE `pec_settings` ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`), ADD KEY `admin_id` (`admin_id`); -- -- Indexes for table `pec_shared_calendars` -- ALTER TABLE `pec_shared_calendars` ADD PRIMARY KEY (`id`), ADD KEY `fk_cal_id` (`cal_id`); -- -- Indexes for table `pec_users` -- ALTER TABLE `pec_users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `username` (`username`), ADD UNIQUE KEY `email` (`email`), ADD KEY `i_username` (`username`), ADD KEY `fk_admin_id` (`admin_id`), ADD KEY `access_key` (`access_key`); -- -- Indexes for table `pec_user_permissions` -- ALTER TABLE `pec_user_permissions` ADD PRIMARY KEY (`user_id`,`permission`); -- -- Indexes for table `pec_user_share_free_busy` -- ALTER TABLE `pec_user_share_free_busy` ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`), ADD KEY `shared_user_id` (`shared_user_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `events` -- ALTER TABLE `events` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23; -- -- AUTO_INCREMENT for table `holidays` -- ALTER TABLE `holidays` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21; -- -- AUTO_INCREMENT for table `login` -- ALTER TABLE `login` MODIFY `id` int(50) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT for table `pec_calendars` -- ALTER TABLE `pec_calendars` MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `pec_default_reminders` -- ALTER TABLE `pec_default_reminders` MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `pec_events` -- ALTER TABLE `pec_events` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; -- -- AUTO_INCREMENT for table `pec_event_calendar_settings` -- ALTER TABLE `pec_event_calendar_settings` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `pec_guests` -- ALTER TABLE `pec_guests` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `pec_mobile_calendar_settings` -- ALTER TABLE `pec_mobile_calendar_settings` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `pec_reminders` -- ALTER TABLE `pec_reminders` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `pec_settings` -- ALTER TABLE `pec_settings` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `pec_shared_calendars` -- ALTER TABLE `pec_shared_calendars` MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `pec_users` -- ALTER TABLE `pec_users` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `pec_user_share_free_busy` -- ALTER TABLE `pec_user_share_free_busy` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- Constraints for dumped tables -- -- -- Constraints for table `pec_admin_user_cals` -- ALTER TABLE `pec_admin_user_cals` ADD CONSTRAINT `pec_admin_user_cals_ibfk_1` FOREIGN KEY (`admin_id`) REFERENCES `pec_users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `pec_calendars` -- ALTER TABLE `pec_calendars` ADD CONSTRAINT `fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `pec_users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `pec_default_reminders` -- ALTER TABLE `pec_default_reminders` ADD CONSTRAINT `pec_default_reminders_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `pec_users` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `pec_default_reminders_ibfk_2` FOREIGN KEY (`cal_id`) REFERENCES `pec_calendars` (`id`) ON DELETE CASCADE; -- -- Constraints for table `pec_events` -- ALTER TABLE `pec_events` ADD CONSTRAINT `pec_events_ibfk_1` FOREIGN KEY (`cal_id`) REFERENCES `pec_calendars` (`id`) ON DELETE CASCADE; -- -- Constraints for table `pec_event_calendar_settings` -- ALTER TABLE `pec_event_calendar_settings` ADD CONSTRAINT `pec_event_calendar_settings_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `pec_users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `pec_guests` -- ALTER TABLE `pec_guests` ADD CONSTRAINT `pec_guests_ibfk_1` FOREIGN KEY (`event_id`) REFERENCES `pec_events` (`id`) ON DELETE CASCADE; -- -- Constraints for table `pec_mobile_calendar_settings` -- ALTER TABLE `pec_mobile_calendar_settings` ADD CONSTRAINT `pec_mobile_calendar_settings_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `pec_users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `pec_reminders` -- ALTER TABLE `pec_reminders` ADD CONSTRAINT `fk_event_id` FOREIGN KEY (`event_id`) REFERENCES `pec_events` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `pec_reminders_ibfk_1` FOREIGN KEY (`event_id`) REFERENCES `pec_events` (`id`) ON DELETE CASCADE; -- -- Constraints for table `pec_shared_calendars` -- ALTER TABLE `pec_shared_calendars` ADD CONSTRAINT `fk_cal_id` FOREIGN KEY (`cal_id`) REFERENCES `pec_calendars` (`id`) ON DELETE CASCADE; -- -- Constraints for table `pec_users` -- ALTER TABLE `pec_users` ADD CONSTRAINT `fk_admin_id` FOREIGN KEY (`admin_id`) REFERENCES `pec_users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `pec_user_permissions` -- ALTER TABLE `pec_user_permissions` ADD CONSTRAINT `pec_user_permissions_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `pec_users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `pec_user_share_free_busy` -- ALTER TABLE `pec_user_share_free_busy` ADD CONSTRAINT `pec_user_share_free_busy_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `pec_users` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `pec_user_share_free_busy_ibfk_2` FOREIGN KEY (`shared_user_id`) REFERENCES `pec_users` (`id`) ON DELETE CASCADE; /*!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 */;