File manager - Edit - /home/wwwroot/camplus.hk/tpbps.camplus.hk/public_html_standalone/install/db/install.sql
Back
-- phpMyAdmin SQL Dump -- version 4.4.15.8 -- https://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 28, 2016 at 03:15 AM -- Server version: 5.5.50-MariaDB -- PHP Version: 5.6.28 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: `camplus_tic` -- DELIMITER $$ -- -- Functions -- CREATE DEFINER=`root`@`localhost` FUNCTION `my_prh_head_approvable`(`pr_id` INT) RETURNS int(11) NO SQL BEGIN DECLARE mid int(11); DECLARE pr_applicant int(11); DECLARE pr_last_user int(11); SET mid =(SELECT MAX(id) from purchase_request_history WHERE purchase_request_history.purchase_request_id = pr_id); SELECT purchase_request_history.status_updated_by, purchase_request.applicant_id into pr_last_user, pr_applicant from purchase_request left join purchase_request_history on purchase_request.id=purchase_request_history.purchase_request_id where purchase_request_history.id= mid AND purchase_request_history.status='pending' LIMIT 1; RETURN IF (pr_applicant=pr_last_user,"1","0"); END$$ CREATE DEFINER=`root`@`localhost` FUNCTION `my_prh_max_isapprove`(`pr_id` INT) RETURNS int(1) BEGIN DECLARE mid int(11); SET mid =(SELECT MAX(id) from purchase_request_history WHERE purchase_request_history.purchase_request_id = pr_id); RETURN (SELECT purchase_request_history.is_approve_action from purchase_request_history where id= mid LIMIT 1); END$$ CREATE DEFINER=`root`@`localhost` FUNCTION `my_prh_max_status`(`pr_id` INT) RETURNS char(10) CHARSET utf8 BEGIN DECLARE mid int(11); SET mid =(SELECT MAX(id) from purchase_request_history WHERE purchase_request_history.purchase_request_id = pr_id); RETURN (SELECT purchase_request_history.`status` from purchase_request_history where id= mid LIMIT 1); END$$ CREATE DEFINER=`root`@`localhost` FUNCTION `my_prh_max_time`(`pr_id` INT) RETURNS char(30) CHARSET utf8 BEGIN DECLARE mid int(11); SET mid =(SELECT MAX(id) from purchase_request_history WHERE purchase_request_history.purchase_request_id = pr_id); RETURN (SELECT purchase_request_history.updated_on from purchase_request_history where id= mid LIMIT 1); END$$ CREATE DEFINER=`root`@`localhost` FUNCTION `my_prh_min_time`(`pr_id` INT) RETURNS char(30) CHARSET utf8 BEGIN DECLARE mid int(11); SET mid =(SELECT MIN(id) from purchase_request_history WHERE purchase_request_history.purchase_request_id = pr_id); RETURN (SELECT purchase_request_history.updated_on from purchase_request_history where id= mid LIMIT 1); END$$ CREATE DEFINER=`root`@`localhost` FUNCTION `my_pr_user_has_permiss`(`uid` INT, `pr_id` INT, `permiss` CHAR(20)) RETURNS char(10) CHARSET utf8 BEGIN DECLARE is_mine TINYINT (1) DEFAULT 0 ; DECLARE res TINYINT (1) DEFAULT 0 ; SET is_mine = ( SELECT 1 FROM purchase_request WHERE purchase_request.applicant_id = uid AND purchase_request.id = pr_id ) ; SET res = ( SELECT 1 FROM ( SELECT permissions.id AS k FROM users_roles, roles_permission, permissions WHERE users_roles.user_id = uid AND users_roles.role_id = roles_permission.role_id AND roles_permission.permission_id = permissions.id ) AS a WHERE k = permiss ) ; IF res = 1 AND is_mine = 1 THEN SET res = 1 ; ELSE SET res = 0 ; END IF ; RETURN res ; END$$ DELIMITER ; -- -------------------------------------------------------- -- -- Table structure for table `academic_years` -- CREATE TABLE IF NOT EXISTS `academic_years` ( `id` int(11) NOT NULL, `year_start` date NOT NULL, `year_end` date NOT NULL, `year_label` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `answers` -- CREATE TABLE IF NOT EXISTS `answers` ( `id` int(11) NOT NULL, `academic_year_id` int(11) NOT NULL, `section_id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `submitted_by` int(11) NOT NULL, `is_overall_appraisal` int(11) NOT NULL, `is_unit` int(11) NOT NULL, `answer` mediumtext COLLATE utf8_unicode_ci NOT NULL, `is_submitted` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `answer_has_grid` -- CREATE TABLE IF NOT EXISTS `answer_has_grid` ( `id` int(11) NOT NULL, `academic_year_id` int(11) NOT NULL, `section_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `submitted_by` int(11) NOT NULL, `question_id` int(11) NOT NULL, `question_of_question_id` int(11) NOT NULL, `answer` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `rank` int(11) NOT NULL, `remark` mediumtext COLLATE utf8_unicode_ci NOT NULL, `is_submitted` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `answer_has_options` -- CREATE TABLE IF NOT EXISTS `answer_has_options` ( `id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `option_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `submitted_by` int(11) NOT NULL, `is_overall_appraisal` int(11) NOT NULL, `is_unit` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `answer_has_table` -- CREATE TABLE IF NOT EXISTS `answer_has_table` ( `id` int(11) NOT NULL, `academic_year_id` int(11) NOT NULL, `section_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `submitted_by` int(11) NOT NULL, `question_id` int(11) NOT NULL, `answer` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `rank` int(11) NOT NULL, `is_submitted` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `ap_roles` -- CREATE TABLE IF NOT EXISTS `ap_roles` ( `id` int(11) NOT NULL, `role` text COLLATE utf8_unicode_ci NOT NULL, `is_approval_role` tinyint(1) NOT NULL, `academic_year_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `ap_users_roles` -- CREATE TABLE IF NOT EXISTS `ap_users_roles` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `role_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `budget_pool_keys` -- CREATE TABLE IF NOT EXISTS `budget_pool_keys` ( `id` int(11) NOT NULL, `pool_key` varchar(45) COLLATE utf8_unicode_ci NOT NULL, `total_budget_amount` decimal(10,2) NOT NULL, `department_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `calendar_type` -- CREATE TABLE IF NOT EXISTS `calendar_type` ( `id` int(11) NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `color` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `is_default` tinyint(4) NOT NULL, `urgent_booking_warning` int(11) NOT NULL, `need_approval` tinyint(4) NOT NULL, `hide_event` tinyint(1) NOT NULL, `approver_user_id` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, `circular_required` tinyint(4) NOT NULL, `display_only` tinyint(4) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `calendar_type_has_forms` -- CREATE TABLE IF NOT EXISTS `calendar_type_has_forms` ( `id` int(11) NOT NULL, `calendar_type_id` int(11) NOT NULL, `form_id` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `circulars` -- CREATE TABLE IF NOT EXISTS `circulars` ( `id` int(11) NOT NULL, `circular_number` int(10) NOT NULL, `event_id` int(11) NOT NULL, `event_series` int(11) NOT NULL, `circular_templates` int(11) NOT NULL, `section_id` int(11) NOT NULL, `teacher_in_charge` int(11) NOT NULL, `circular_body` text COLLATE utf8_unicode_ci NOT NULL, `distribute_date` date NOT NULL, `status` enum('APPROVED','REJECTED','RELEASED','SUBMITTED','DRAFT','PENDING') COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `circular_templates` -- CREATE TABLE IF NOT EXISTS `circular_templates` ( `id` int(11) NOT NULL, `circular_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `circular_body` text COLLATE utf8_unicode_ci NOT NULL, `files` text COLLATE utf8_unicode_ci NOT NULL, `is_enabled` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `departments` -- CREATE TABLE IF NOT EXISTS `departments` ( `id` int(11) NOT NULL, `department_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `description` text COLLATE utf8_unicode_ci NOT NULL, `financial_year_id` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `department_budget_items` -- CREATE TABLE IF NOT EXISTS `department_budget_items` ( `id` int(11) NOT NULL, `title` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `description` text COLLATE utf8_unicode_ci NOT NULL, `department_id` int(11) NOT NULL, `budget_allowance` decimal(10,2) NOT NULL, `budget_amount` decimal(10,2) NOT NULL, `budget_pool_key_id` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `department_staffs` -- CREATE TABLE IF NOT EXISTS `department_staffs` ( `id` int(11) NOT NULL, `department_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `role` enum('HEAD','MEMBER') COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `eb_facilities` -- CREATE TABLE IF NOT EXISTS `eb_facilities` ( `id` int(11) NOT NULL, `facility_id` int(11) NOT NULL, `is_enabled` tinyint(4) NOT NULL, `need_approval` tinyint(4) NOT NULL, `approver_user_id` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `eb_settings` -- CREATE TABLE IF NOT EXISTS `eb_settings` ( `id` int(11) NOT NULL, `key` varchar(100) CHARACTER SET utf8 DEFAULT NULL, `val` text CHARACTER SET utf8 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `eb_venues` -- CREATE TABLE IF NOT EXISTS `eb_venues` ( `id` int(11) NOT NULL, `venue_id` int(11) NOT NULL, `is_enabled` tinyint(4) NOT NULL, `need_approval` tinyint(4) NOT NULL, `approver_user_id` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `events` -- CREATE TABLE IF NOT EXISTS `events` ( `id` int(11) NOT NULL, `event_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `calendar_type_id` int(11) NOT NULL, `event_type_id` int(11) NOT NULL, `teacher_in_charge` int(11) NOT NULL, `remark` mediumtext COLLATE utf8_unicode_ci NOT NULL, `serializeData` mediumtext COLLATE utf8_unicode_ci NOT NULL, `status` enum('DRAFT','PENDING','PUBLISHED','REJECTED','WITHDRAW','APPROVED') COLLATE utf8_unicode_ci NOT NULL, `added_on` datetime NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `event_forms_history` -- CREATE TABLE IF NOT EXISTS `event_forms_history` ( `id` int(11) NOT NULL, `event_id` int(11) NOT NULL, `form_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `from_status` enum('PENDING','APPROVED','REJECTED','SUBMITTED','RELEASED','WITHDRAW') COLLATE utf8_unicode_ci NOT NULL, `to_status` enum('PENDING','APPROVED','REJECTED','SUBMITTED','RELEASED','WITHDRAW') COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `event_has_files` -- CREATE TABLE IF NOT EXISTS `event_has_files` ( `id` int(11) NOT NULL, `event_id` int(11) NOT NULL, `file_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `event_has_forms` -- CREATE TABLE IF NOT EXISTS `event_has_forms` ( `id` int(11) NOT NULL, `event_id` int(11) NOT NULL, `form_id` int(11) NOT NULL, `status` enum('PENDING','APPROVED','REJECTED','SUBMITTED','RELEASED','WITHDRAW','DRAFT') COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `event_has_sections` -- CREATE TABLE IF NOT EXISTS `event_has_sections` ( `id` int(11) NOT NULL, `event_id` int(11) NOT NULL, `startDate` date NOT NULL, `from_time` varchar(55) COLLATE utf8_unicode_ci NOT NULL, `to_time` varchar(55) COLLATE utf8_unicode_ci NOT NULL, `section_group` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `event_section_has_facilities` -- CREATE TABLE IF NOT EXISTS `event_section_has_facilities` ( `id` int(11) NOT NULL, `section_id` int(11) NOT NULL, `facility_id` int(11) NOT NULL, `status` enum('PENDING','APPROVED') COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `event_section_has_participants` -- CREATE TABLE IF NOT EXISTS `event_section_has_participants` ( `id` int(11) NOT NULL, `section_id` int(11) NOT NULL, `participant_id` int(11) NOT NULL, `group_id` int(11) NOT NULL, `other` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `event_section_has_venues` -- CREATE TABLE IF NOT EXISTS `event_section_has_venues` ( `id` int(11) NOT NULL, `section_id` int(11) NOT NULL, `venue_id` int(11) NOT NULL, `other` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `status` enum('PENDING','PENDING0','PENDING1','PENDING2','PENDING3','APPROVED') COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `event_types` -- CREATE TABLE IF NOT EXISTS `event_types` ( `id` int(11) NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `facilities` -- CREATE TABLE IF NOT EXISTS `facilities` ( `id` int(11) NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `quantity` int(11) NOT NULL, `remarks` mediumtext COLLATE utf8_unicode_ci NOT NULL, `order` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `financial_years` -- CREATE TABLE IF NOT EXISTS `financial_years` ( `id` int(11) NOT NULL, `year_start` date NOT NULL, `year_end` date NOT NULL, `year_label` varchar(12) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `forms` -- CREATE TABLE IF NOT EXISTS `forms` ( `id` int(11) NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `need_approval` tinyint(4) NOT NULL, `approver` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, `is_enabled` tinyint(4) NOT NULL, `deadline` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `form_answers` -- CREATE TABLE IF NOT EXISTS `form_answers` ( `id` int(11) NOT NULL, `form_id` int(11) NOT NULL, `event_id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `answer` mediumtext COLLATE utf8_unicode_ci NOT NULL, `is_submitted` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `form_answer_has_grid` -- CREATE TABLE IF NOT EXISTS `form_answer_has_grid` ( `id` int(11) NOT NULL, `form_id` int(11) NOT NULL, `event_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `question_of_question_id` int(11) NOT NULL, `answer` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `rank` int(11) NOT NULL, `remark` mediumtext COLLATE utf8_unicode_ci NOT NULL, `is_submitted` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `form_answer_has_table` -- CREATE TABLE IF NOT EXISTS `form_answer_has_table` ( `id` int(11) NOT NULL, `form_id` int(11) NOT NULL, `event_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `answer` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `rank` int(11) NOT NULL, `is_submitted` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `form_has_questions` -- CREATE TABLE IF NOT EXISTS `form_has_questions` ( `id` int(11) NOT NULL, `question` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `form_id` int(11) NOT NULL, `placeholder` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `question_type` enum('LABEL','SINGLE_LINE','MULTIPLE_LINE','SUGGESTED','RADIO_BUTTON','CHECKBOX','DROPDOWN','DATETIME','DATE','TIME','GRID','TABLE','NUMBER','ATTACHMENT') COLLATE utf8_unicode_ci NOT NULL, `grid_count` int(11) NOT NULL, `grid_table_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `rank` int(11) NOT NULL, `added_on` datetime NOT NULL, `description` text COLLATE utf8_unicode_ci NOT NULL, `color` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `font_size` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `form_question_has_options` -- CREATE TABLE IF NOT EXISTS `form_question_has_options` ( `id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `option` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `form_question_has_questions` -- CREATE TABLE IF NOT EXISTS `form_question_has_questions` ( `id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `question` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `is_remark` int(11) NOT NULL, `remark_checkpoint` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `is_na` int(11) NOT NULL, `options` int(11) NOT NULL, `rank` int(11) NOT NULL, `description` text COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `form_question_has_token` -- CREATE TABLE IF NOT EXISTS `form_question_has_token` ( `id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `token` text COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `groups` -- CREATE TABLE IF NOT EXISTS `groups` ( `id` int(11) NOT NULL, `name` text NOT NULL, `parent` int(11) DEFAULT NULL, `enabled` tinyint(1) NOT NULL, `weight` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `hr_settings` -- CREATE TABLE IF NOT EXISTS `hr_settings` ( `id` int(11) NOT NULL, `key` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `hr_settings` -- INSERT INTO `hr_settings` (`id`, `key`, `value`) VALUES (1, 'visible_to_unit_heads', 's:5:"false";'), (2, 'visible_to_appraisal_roles', 's:5:"false";'), (3, 'report_visible_to_user', 's:5:"false";'), (4, 'view_grid_question_ans_as_no', 's:4:"true";'); -- -------------------------------------------------------- -- -- Table structure for table `lb_book_info` -- CREATE TABLE IF NOT EXISTS `lb_book_info` ( `id` int(11) NOT NULL, `physical_form` enum('Book','Journal','CD/DVD','Manuscript','Others') CHARACTER SET utf8 NOT NULL, `author` text CHARACTER SET utf8 NOT NULL, `subtitle` varchar(100) CHARACTER SET utf8 NOT NULL, `edition_year` year(4) NOT NULL, `publisher` varchar(100) CHARACTER SET utf8 NOT NULL, `series` varchar(100) CHARACTER SET utf8 NOT NULL, `size1` enum('Medium','Large','Huge','Small','Tiny') CHARACTER SET utf8 NOT NULL, `price` varchar(100) CHARACTER SET utf8 NOT NULL, `call_no` varchar(100) CHARACTER SET utf8 NOT NULL, `location` varchar(100) CHARACTER SET utf8 NOT NULL, `clue_page` varchar(100) CHARACTER SET utf8 NOT NULL, `category_id` varchar(100) CHARACTER SET utf8 NOT NULL, `editor` varchar(100) CHARACTER SET utf8 NOT NULL, `title` text CHARACTER SET utf8 NOT NULL, `edition` varchar(100) CHARACTER SET utf8 NOT NULL, `publishing_year` year(4) NOT NULL, `publication_place` varchar(100) CHARACTER SET utf8 NOT NULL, `number_of_pages` int(11) NOT NULL, `number_of_books` int(11) NOT NULL, `dues` varchar(100) CHARACTER SET utf8 NOT NULL, `isbn` varchar(100) CHARACTER SET utf8 NOT NULL, `source_details` enum('Local Purchase','University','World Bank Donation','Personal Donation','Others') CHARACTER SET utf8 NOT NULL, `notes` varchar(100) CHARACTER SET utf8 NOT NULL, `cover` text CHARACTER SET utf8 NOT NULL, `pdf` text CHARACTER SET utf8, `is_uploaded` enum('0','1') CHARACTER SET utf8 NOT NULL DEFAULT '1', `deleted` enum('0','1') CHARACTER SET utf8 NOT NULL DEFAULT '0', `status` enum('0','1') CHARACTER SET utf8 NOT NULL DEFAULT '1', `add_date` datetime NOT NULL, `group_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `lb_category` -- CREATE TABLE IF NOT EXISTS `lb_category` ( `id` int(11) NOT NULL, `category_name` varchar(100) CHARACTER SET utf8 NOT NULL, `deleted` enum('0','1') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `lb_circulation` -- CREATE TABLE IF NOT EXISTS `lb_circulation` ( `id` int(11) NOT NULL, `member_id` varchar(99) NOT NULL, `book_id` varchar(99) NOT NULL, `issue_date` date NOT NULL, `expire_date` date NOT NULL, `return_date` date NOT NULL, `fine_amount` double NOT NULL, `is_returned` tinyint(1) NOT NULL, `is_expired` enum('0','1') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `lb_circulation_config` -- CREATE TABLE IF NOT EXISTS `lb_circulation_config` ( `id` int(11) NOT NULL, `member_type_id` varchar(99) NOT NULL, `issue_day_limit` varchar(99) NOT NULL, `issu_book_limit` int(11) NOT NULL, `fine_per_day` double NOT NULL, `deleted` enum('0','1') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `lb_daily_read_material` -- CREATE TABLE IF NOT EXISTS `lb_daily_read_material` ( `id` int(11) NOT NULL, `book_id` varchar(99) NOT NULL, `read_at` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `lb_email_config` -- CREATE TABLE IF NOT EXISTS `lb_email_config` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `email_address` varchar(250) NOT NULL, `smtp_host` varchar(250) NOT NULL, `smtp_port` varchar(100) NOT NULL, `smtp_user` varchar(100) NOT NULL, `smtp_password` varchar(100) NOT NULL, `status` enum('0','1') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `lb_forget_password` -- CREATE TABLE IF NOT EXISTS `lb_forget_password` ( `id` int(12) NOT NULL, `confirmation_code` varchar(15) CHARACTER SET latin1 NOT NULL, `email` varchar(250) CHARACTER SET latin1 NOT NULL, `success` int(11) NOT NULL DEFAULT '0', `expiration` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `lb_member` -- CREATE TABLE IF NOT EXISTS `lb_member` ( `id` int(11) NOT NULL, `name` varchar(99) CHARACTER SET utf8 NOT NULL, `type_id` int(11) NOT NULL, `email` varchar(250) NOT NULL, `mobile` varchar(100) NOT NULL, `password` varchar(99) NOT NULL, `address` text CHARACTER SET utf8 NOT NULL, `user_type` enum('Member','Admin') NOT NULL, `status` enum('1','0') NOT NULL, `add_date` date NOT NULL, `deleted` enum('0','1') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `lb_member_type` -- CREATE TABLE IF NOT EXISTS `lb_member_type` ( `id` int(11) NOT NULL, `member_type_name` varchar(100) CHARACTER SET utf8 NOT NULL, `deleted` enum('0','1') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `lb_request_book` -- CREATE TABLE IF NOT EXISTS `lb_request_book` ( `id` int(11) NOT NULL, `member_id` int(11) NOT NULL, `book_title` text CHARACTER SET utf8 NOT NULL, `author` text CHARACTER SET utf8 NOT NULL, `edition` varchar(200) CHARACTER SET utf8 NOT NULL, `note` text CHARACTER SET utf8 NOT NULL, `request_date` date NOT NULL, `reply` text CHARACTER SET utf8 NOT NULL, `request_status` varchar(55) NOT NULL DEFAULT 'Pending' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `lb_sms_config` -- CREATE TABLE IF NOT EXISTS `lb_sms_config` ( `id` int(11) NOT NULL, `name` enum('planet','plivo','twilio','clickatell','nexmo') CHARACTER SET utf8 NOT NULL, `auth_id` varchar(100) NOT NULL, `token` varchar(100) NOT NULL, `api_id` varchar(100) NOT NULL, `phone_number` varchar(100) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `lb_sms_email_history` -- CREATE TABLE IF NOT EXISTS `lb_sms_email_history` ( `id` int(11) NOT NULL, `member_id` int(11) NOT NULL, `title` text CHARACTER SET utf8 NOT NULL, `message` text CHARACTER SET utf8 NOT NULL, `type` enum('SMS','Email','Notification') NOT NULL, `sent_at` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `lb_terms_and_condition` -- CREATE TABLE IF NOT EXISTS `lb_terms_and_condition` ( `id` int(11) NOT NULL, `terms_and_condition` text CHARACTER SET utf8 NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `msg_messages` -- CREATE TABLE IF NOT EXISTS `msg_messages` ( `id` int(11) NOT NULL, `thread_id` int(11) NOT NULL, `body` text NOT NULL, `priority` int(2) NOT NULL DEFAULT '0', `sender_id` int(11) NOT NULL, `cdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `msg_participants` -- CREATE TABLE IF NOT EXISTS `msg_participants` ( `user_id` int(11) NOT NULL, `thread_id` int(11) NOT NULL, `cdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `msg_status` -- CREATE TABLE IF NOT EXISTS `msg_status` ( `message_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `status` int(2) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `msg_threads` -- CREATE TABLE IF NOT EXISTS `msg_threads` ( `id` int(11) NOT NULL, `subject` text ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `overall_appraisals` -- CREATE TABLE IF NOT EXISTS `overall_appraisals` ( `id` int(11) NOT NULL, `academic_year_id` int(11) NOT NULL, `template_id` int(11) NOT NULL, `added_on` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `overall_appraisal_has_questions` -- CREATE TABLE IF NOT EXISTS `overall_appraisal_has_questions` ( `id` int(11) NOT NULL, `question` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `appraisal_id` int(11) NOT NULL, `placeholder` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `question_type` enum('SINGLE_LINE','MULTIPLE_LINE','RADIO_BUTTON','CHECKBOX','DROPDOWN','DATETIME','GRID','TABLE','NUMBER','ATTACHMENT') COLLATE utf8_unicode_ci NOT NULL, `grid_count` int(11) NOT NULL, `grid_table_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `rank` int(11) NOT NULL, `self` tinyint(4) NOT NULL, `roles` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `added_on` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `overall_appraisal_question_has_options` -- CREATE TABLE IF NOT EXISTS `overall_appraisal_question_has_options` ( `id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `option` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `overall_appraisal_question_has_questions` -- CREATE TABLE IF NOT EXISTS `overall_appraisal_question_has_questions` ( `id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `question` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `is_remark` int(11) NOT NULL, `remark_checkpoint` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `is_na` int(11) NOT NULL, `options` int(11) NOT NULL, `rank` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `overall_appraisal_workflow` -- CREATE TABLE IF NOT EXISTS `overall_appraisal_workflow` ( `id` int(11) NOT NULL, `academic_year_id` int(11) NOT NULL, `cat_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `workflow` mediumtext COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `participants` -- CREATE TABLE IF NOT EXISTS `participants` ( `id` int(11) NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `is_enabled` tinyint(4) NOT NULL, `order` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `participants_has_groups` -- CREATE TABLE IF NOT EXISTS `participants_has_groups` ( `id` int(11) NOT NULL, `participant_id` int(11) NOT NULL, `group_id` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `participant_group` -- CREATE TABLE IF NOT EXISTS `participant_group` ( `id` int(11) NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `permissions` -- CREATE TABLE IF NOT EXISTS `permissions` ( `id` int(11) NOT NULL, `permission_title` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `permission_key` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, `module` enum('CORE','PR','HR','EB') COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=126 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='<double-click to overwrite multiple objects>'; -- -- Dumping data for table `permissions` -- INSERT INTO `permissions` (`id`, `permission_title`, `permission_key`, `module`) VALUES (1, 'Create User', 'CREATE_USER', 'CORE'), (2, 'Import Users', 'IMPORT_USERS', 'CORE'), (3, 'View All Users', 'VIEW_ALL_USERS', 'CORE'), (4, 'Edit All Users', 'EDIT_ALL_USERS', 'CORE'), (5, 'Delete All Users', 'DELETE_ALL_USERS', 'CORE'), (6, 'Cancel All Users', 'CANCEL_ALL_USERS', 'CORE'), (7, 'Assign Roles to User', 'ASSIGN_ROLES_TO_USER', 'CORE'), (8, 'Edit Site Settings', 'EDIT_SITE_SETTINGS', 'CORE'), (9, 'Enable/Disable Modules', 'ENABLE_DISABLE_MODULES', 'CORE'), (10, 'Administer Modules Permissions', 'ADMINISTER_MODULES_PERMISSIONS', 'CORE'), (11, 'View Own PR', 'VIEW_OWN_PR', 'PR'), (12, 'Create PR', 'CREATE_PR', 'PR'), (13, 'Edit Own PR', 'EDIT_OWN_PR', 'PR'), (14, 'Submit PR', 'SUBMIT_PR', 'PR'), (15, 'Cancel Own PR', 'CANCEL_OWN_PR', 'PR'), (16, 'Amend Own PR', 'AMEND_OWN_PR', 'PR'), (17, 'Delete Own PR', 'DELETE_OWN_PR', 'PR'), (18, 'View Own Department PR', 'VIEW_OWN_DEPARTMENT_PR', 'PR'), (19, 'View All PR', 'VIEW_ALL_PR', 'PR'), (20, 'Approve PR', 'APPROVE_PR', 'PR'), (21, 'Complete PR', 'COMPLETE_PR', 'PR'), (22, 'Edit All PR', 'EDIT_ALL_PR', 'PR'), (23, 'Cancel All PR ', 'CANCEL_ALL_PR', 'PR'), (24, 'Amend All PR', 'AMEND_ALL_PR', 'PR'), (25, 'Delete All PR', 'DELETE_ALL_PR', 'PR'), (26, 'Create School Department', 'CREATE_SCHOOL_DEPARTMENT', 'PR'), (27, 'Edit School Department', 'EDIT_SCHOOL_DEPARTMENT', 'PR'), (28, 'Delete School Department', 'DELETE_SCHOOL_DEPARTMENT', 'PR'), (29, 'View All School Department', 'VIEW_ALL_SCHOOL_DEPARTMENT', 'PR'), (30, 'Create Budget Item', 'CREATE_BUDGET_ITEM', 'PR'), (31, 'Edit Budget Item', 'EDIT_BUDGET_ITEM', 'PR'), (32, 'Delete Budget Item', 'DELETE_BUDGET_ITEM', 'PR'), (33, 'View All Budget Item', 'VIEW_ALL_BUDGET_ITEM', 'PR'), (34, 'View All Budget Report', 'VIEW_ALL_BUDGET_REPORT', 'PR'), (35, 'View Own Department Budget Report', 'VIEW_OWN_DEPARTMENT_BUDGET__REPORT', 'PR'), (36, 'View Suppliers', 'VIEW_SUPPLIERS', 'PR'), (37, 'Add Supplier', 'ADD_SUPPLIER', 'PR'), (38, 'Edit Supplier', 'EDIT_SUPPLIER', 'PR'), (39, 'Delete Supplier', 'DELETE_SUPPLIER', 'PR'), (40, 'View Financial Year', 'VIEW_FINANCIAL_YEAR', 'PR'), (41, 'Add Financial Year', 'ADD_FINANCIAL_YEAR', 'PR'), (42, 'Edit Financial Year', 'EDIT_FINANCIAL_YEAR', 'PR'), (43, 'Delete FInancial Year', 'DELETE_FINANCIAL_YEAR', 'PR'), (44, 'Edit/Save PR Voucher No', 'EDIT_SAVE_PR_VOUCHER_NO', 'PR'), (45, 'Configure PR policy', 'CONFIGURE_PR_POLICY', 'PR'), (46, 'View Email Templates', 'VIEW_EMAIL_TEMPLATES', 'PR'), (47, 'Edit Email Template', 'EDIT_EMAIL_TEMPLATE', 'PR'), (48, 'View Academic Year', 'VIEW_ACADEMIC_YEAR', 'HR'), (49, 'Add Academic Year', 'ADD_ACADEMIC_YEAR', 'HR'), (50, 'Edit Academic Year', 'EDIT_ACADEMIC_YEAR', 'HR'), (51, 'Delete Academic Year', 'DELETE_ACADEMIC_YEAR', 'HR'), (52, 'View Evaluation Template', 'VIEW_EVALUATION_TEMPLATE', 'HR'), (53, 'Add Evaluation Template', 'ADD_EVALUATION_TEMPLATE', 'HR'), (54, 'Edit Evaluation Template', 'EDIT_EVALUATION_TEMPLATE', 'HR'), (55, 'Delete Evaluation Template', 'DELETE_EVALUATION_TEMPLATE', 'HR'), (56, 'View Unit Appraisal', 'VIEW_UNIT_APPRAISAL', 'HR'), (57, 'Add Unit Appraisal', 'ADD_UNIT_APPRAISAL', 'HR'), (58, 'Edit Unit Appraisal', 'EDIT_UNIT_APPRAISAL', 'HR'), (59, 'Delete Unit Appraisal', 'DELETE_UNIT_APPRAISAL', 'HR'), (60, 'View Overall Appraisal', 'VIEW_OVERALL_APPRAISAL', 'HR'), (61, 'Add Overall Appraisal', 'ADD_OVERALL_APPRAISAL', 'HR'), (62, 'Edit Overall Appraisal', 'EDIT_OVERALL_APPRAISAL', 'HR'), (63, 'Delete Overall Appraisal', 'DELETE_OVERALL_APPRAISAL', 'HR'), (64, 'View Overall Appraisal Workflow', 'VIEW_OVERALL_APPRAISAL_WORKFLOW', 'HR'), (65, 'Add Overall Appraisal Workflow', 'ADD_OVERALL_APPRAISAL_WORKFLOW', 'HR'), (66, 'Edit Overall Appraisal Workflow', 'EDIT_OVERALL_APPRAISAL_WORKFLOW', 'HR'), (67, 'Delete Overall Appraisal Workflow', 'DELETE_OVERALL_APPRAISAL_WORKFLOW', 'HR'), (68, 'View Appraisal Form', 'VIEW_APPRAISAL_FORM', 'HR'), (69, 'Add Appraisal Form', 'ADD_APPRAISAL_FORM', 'HR'), (70, 'Edit Appraisal Form', 'EDIT_APPRAISAL_FORM', 'HR'), (71, 'Delete Appraisal Form', 'DELETE_APPRAISAL_FORM', 'HR'), (72, 'Do My Appraisal', 'DO_MY_APPRAISAL', 'HR'), (73, 'View My Appraisal', 'VIEW_MY_APPRAISAL', 'HR'), (74, 'View All Appraisal', 'VIEW_ALL_APPRAISAL', 'HR'), (75, 'Edit Appraisal Servey', 'EDIT_APPRAISAL_SERVEY', 'HR'), (76, 'Delete Appraisal Servey', 'DELETE_APPRAISAL_SERVEY', 'HR'), (77, 'View All User Data', 'VIEW_ALL_USERDATA', 'HR'), (78, 'HR Setting', 'HR_SETTING', 'HR'), (79, 'Add Events', 'ADD_EVENTS', 'EB'), (80, 'View My Events', 'VIEW_MY_EVENTS', 'EB'), (81, 'View All Events', 'VIEW_ALL_EVENTS', 'EB'), (82, 'Edit Own Events', 'EDIT_OWN_EVENTS', 'EB'), (83, 'Edit All Events', 'EDIT_ALL_EVENTS', 'EB'), (84, 'Delete Own Events', 'DELETE_OWN_EVENTS', 'EB'), (85, 'Delete All Events', 'DELETE_ALL_EVENTS', 'EB'), (86, 'Cancel Own Events', 'CANCEL_OWN_EVENTS', 'EB'), (87, 'Approve Events', 'APPROVE_EVENTS', 'EB'), (88, 'View Calender Type', 'VIEW_CALENDER_TYPE', 'EB'), (89, 'Add Calender Type', 'ADD_CALENDER_TYPE', 'EB'), (90, 'Edit Calender Type', 'EDIT_CALENDER_TYPE', 'EB'), (91, 'Delete Calender Type', 'DELETE_CALENDER_TYPE', 'EB'), (92, 'View Facility', 'VIEW_FACILITY', 'EB'), (93, 'Add Facility', 'ADD_FACILITY', 'EB'), (94, 'Edit Facility', 'EDIT_FACILITY', 'EB'), (95, 'Delete Facility', 'DELETE_FACILITY', 'EB'), (96, 'View Venue', 'VIEW_VENUE', 'EB'), (97, 'Add Venue', 'ADD_VENUE', 'EB'), (98, 'Edit Venue', 'EDIT_VENUE', 'EB'), (99, 'Delete Venue', 'DELETE_VENUE', 'EB'), (100, 'View Participants', 'VIEW_PARTICIPANTS', 'EB'), (101, 'Add Participants', 'ADD_PARTICIPANTS', 'EB'), (102, 'Edit Participants', 'EDIT_PARTICIPANTS', 'EB'), (103, 'Delete Participants', 'DELETE_PARTICIPANTS', 'EB'), (104, 'View Participants Group', 'VIEW_PARTICIPANTS_GROUP', 'EB'), (105, 'Add Participants Group', 'ADD_PARTICIPANTS_GROUP', 'EB'), (106, 'Edit Participants Group', 'EDIT_PARTICIPANTS_GROUP', 'EB'), (107, 'Delete Participants Group', 'DELETE_PARTICIPANTS_GROUP', 'EB'), (108, 'View Event Forms', 'VIEW_EVENT_FORMS', 'EB'), (109, 'Add Event Forms', 'ADD_EVENT_FORMS', 'EB'), (110, 'Edit Event Forms', 'EDIT_EVENT_FORMS', 'EB'), (111, 'Delete Event Forms', 'DELETE_EVENT_FORMS', 'EB'), (112, 'View Circular', 'VIEW_CIRCULAR', 'EB'), (113, 'Add Circular', 'ADD_CIRCULAR', 'EB'), (114, 'Edit Own Circular', 'EDIT_OWN_CIRCULAR', 'EB'), (115, 'Edit All Circular', 'EDIT_ALL_CIRCULAR', 'EB'), (116, 'Delete All Circular', 'DELETE_ALL_CIRCULAR', 'EB'), (117, 'Delete Own Circular', 'DELETE_OWN_CIRCULAR', 'EB'), (118, 'Approve Circular', 'APPROVE_CIRCULAR', 'EB'), (119, 'View Circular Template', 'VIEW_CIRCULAR_TEMPLATE', 'EB'), (120, 'Add Circular Template', 'ADD_CIRCULAR_TEMPLATE', 'EB'), (121, 'Edit Circular Template', 'EDIT_CIRCULAR_TEMPLATE', 'EB'), (122, 'Delete Circular Template', 'DELETE_CIRCULAR_TEMPLATE', 'EB'), (123, 'Event Booking Settings', 'EVENT_BOOKING_SETTINGS', 'EB'), (124, 'Create Display Only Calendar Event', 'CREATE_DISPLAY_ONLY_CALENDAR_EVENT', 'EB'), (125, 'Administer Roles', 'ADMINISTER_ROLES', 'CORE'); -- -------------------------------------------------------- -- -- Table structure for table `pr_approval_status` -- CREATE TABLE IF NOT EXISTS `pr_approval_status` ( `id` int(11) NOT NULL, `purchase_request_id` int(11) DEFAULT NULL, `status` enum('pending','approved','rejected','cancelled','completed','draft') CHARACTER SET utf8 DEFAULT NULL, `approval_role_id` int(11) DEFAULT NULL, `updated_on` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `pr_budget_items` -- CREATE TABLE IF NOT EXISTS `pr_budget_items` ( `id` int(11) NOT NULL, `purchase_request_id` int(11) DEFAULT NULL, `department_budget_item_id` int(11) DEFAULT NULL, `request_amount` decimal(10,2) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `pr_has_referenec_supplier` -- CREATE TABLE IF NOT EXISTS `pr_has_referenec_supplier` ( `id` int(11) NOT NULL, `supplier_id` int(11) NOT NULL, `purchase_request_id` int(11) NOT NULL, `file_ext` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `pic_id` int(11) NOT NULL, `price` decimal(10,0) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `pr_has_sub_items` -- CREATE TABLE IF NOT EXISTS `pr_has_sub_items` ( `id` int(11) NOT NULL, `purchase_request_id` int(11) NOT NULL, `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `quantity` int(11) NOT NULL, `unit_price` decimal(10,0) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `pr_settings` -- CREATE TABLE IF NOT EXISTS `pr_settings` ( `id` int(11) NOT NULL, `key` varchar(100) CHARACTER SET utf8 DEFAULT NULL, `val` text CHARACTER SET utf8 ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `pr_settings` -- INSERT INTO `pr_settings` (`id`, `key`, `val`) VALUES (1, 'pool_key_enabled', 's:5:"false";'), (2, 'office_submission_enabled', 's:5:"false";'), (3, 'currency_prefix', 's:3:"HK$";'), (4, 'pr_reference_number_prefix', 's:0:"";'), (5, 'next_pr_reference_number', 's:0:"";'); -- -------------------------------------------------------- -- -- Table structure for table `pr_student_payment` -- CREATE TABLE IF NOT EXISTS `pr_student_payment` ( `id` int(11) NOT NULL, `purchase_request_id` int(11) NOT NULL, `number_of_students` int(11) NOT NULL, `payment_per_student` decimal(10,0) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `purchase_request` -- CREATE TABLE IF NOT EXISTS `purchase_request` ( `id` int(11) NOT NULL, `pr_reference_number_prefix` varchar(120) COLLATE utf8_unicode_ci NOT NULL, `pr_reference_number_count` int(11) NOT NULL, `item_name` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, `usage` text COLLATE utf8_unicode_ci, `is_applicant_other` tinyint(1) DEFAULT NULL, `applicant_id` int(11) DEFAULT NULL, `submitted_by` int(11) DEFAULT NULL, `reason_for_multiple_items` text COLLATE utf8_unicode_ci, `total_request_amount` decimal(10,2) DEFAULT NULL, `payment_from_students` decimal(10,2) DEFAULT NULL, `chosen_supplier_id` int(11) DEFAULT NULL, `chosen_price` decimal(10,2) DEFAULT NULL, `chosen_supplier_quotation_file_ext` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `is_sole_supplier` tinyint(1) DEFAULT NULL, `is_tender_payment` tinyint(1) DEFAULT NULL, `other_reasons_cannot_provide_ref_sup` tinyint(1) DEFAULT NULL, `reason_no_reference_supplier` text COLLATE utf8_unicode_ci, `reason_no_lower_price` text COLLATE utf8_unicode_ci, `remarks` text COLLATE utf8_unicode_ci, `payment_method` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `is_cheque_payable_others` tinyint(1) DEFAULT NULL, `cheque_payable_to` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `status` enum('draft','pending') COLLATE utf8_unicode_ci DEFAULT NULL, `amend_count` int(11) NOT NULL, `voucher_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `copy_of` int(11) NOT NULL, `serializeData` mediumtext COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='<double-click to overwrite multiple objects>'; -- -------------------------------------------------------- -- -- Table structure for table `purchase_request_history` -- CREATE TABLE IF NOT EXISTS `purchase_request_history` ( `id` int(11) NOT NULL, `purchase_request_id` int(11) NOT NULL, `status` enum('draft','pending','approved','rejected','completed','cancelled') COLLATE utf8_unicode_ci NOT NULL, `updated_on` datetime NOT NULL, `status_updated_by` int(11) NOT NULL, `is_approve_action` int(11) NOT NULL, `reject_reason` text COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `questions` -- CREATE TABLE IF NOT EXISTS `questions` ( `id` int(11) NOT NULL, `question` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `template_id` int(11) NOT NULL, `placeholder` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `question_type` enum('SINGLE_LINE','MULTIPLE_LINE','RADIO_BUTTON','CHECKBOX','DROPDOWN','DATETIME','GRID','TABLE','NUMBER','ATTACHMENT') COLLATE utf8_unicode_ci NOT NULL, `grid_count` int(11) NOT NULL, `grid_table_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `rank` int(11) NOT NULL, `added_on` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `question_has_options` -- CREATE TABLE IF NOT EXISTS `question_has_options` ( `id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `option` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `question_has_questions` -- CREATE TABLE IF NOT EXISTS `question_has_questions` ( `id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `question` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `is_remark` int(11) NOT NULL, `remark_checkpoint` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `is_na` int(11) NOT NULL, `options` int(11) NOT NULL, `rank` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `reference_supplier_info` -- CREATE TABLE IF NOT EXISTS `reference_supplier_info` ( `id` int(11) NOT NULL, `supplier_id` int(11) NOT NULL, `price` decimal(10,2) NOT NULL, `contact` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `file_ext` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `purchase_request_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `roles` -- CREATE TABLE IF NOT EXISTS `roles` ( `id` int(11) NOT NULL, `role` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `is_approval_role` int(11) NOT NULL, `system_role` tinyint(1) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='All roles available for the system'; -- -- Dumping data for table `roles` -- INSERT INTO `roles` (`id`, `role`, `is_approval_role`, `system_role`) VALUES (1, 'System Admin', 0, 1), (2, 'Authenticated User', 0, 1), (3, 'Principal', 1, 1); -- -------------------------------------------------------- -- -- Table structure for table `roles_permission` -- CREATE TABLE IF NOT EXISTS `roles_permission` ( `id` int(11) NOT NULL, `role_id` int(11) DEFAULT NULL, `permission_id` int(11) DEFAULT NULL ) ENGINE=InnoDB AUTO_INCREMENT=273 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='<double-click to overwrite multiple objects>'; -- -- Dumping data for table `roles_permission` -- INSERT INTO `roles_permission` (`id`, `role_id`, `permission_id`) 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, 12), (13, 1, 13), (14, 1, 14), (15, 1, 15), (16, 1, 16), (17, 1, 17), (18, 1, 18), (19, 1, 19), (20, 1, 20), (21, 1, 21), (22, 1, 22), (23, 1, 23), (24, 1, 24), (25, 1, 25), (26, 1, 26), (27, 1, 27), (28, 1, 28), (29, 1, 29), (30, 1, 30), (31, 1, 31), (32, 1, 32), (33, 1, 33), (34, 1, 34), (35, 1, 35), (36, 1, 36), (37, 1, 37), (38, 1, 38), (39, 1, 39), (40, 1, 40), (41, 1, 41), (42, 1, 42), (43, 1, 43), (44, 1, 44), (45, 1, 45), (46, 1, 46), (47, 1, 47), (48, 1, 48), (49, 1, 49), (50, 1, 50), (51, 1, 51), (52, 1, 52), (53, 1, 53), (54, 1, 54), (55, 1, 55), (56, 1, 56), (57, 1, 57), (58, 1, 58), (59, 1, 59), (60, 1, 60), (61, 1, 61), (62, 1, 62), (63, 1, 63), (64, 1, 64), (65, 1, 65), (66, 1, 66), (67, 1, 67), (68, 1, 68), (69, 1, 69), (70, 1, 70), (71, 1, 71), (72, 1, 72), (73, 1, 73), (74, 1, 74), (75, 1, 75), (76, 1, 76), (77, 1, 77), (78, 1, 78), (79, 1, 79), (80, 1, 80), (81, 1, 81), (82, 1, 82), (83, 1, 83), (84, 1, 84), (85, 1, 85), (86, 1, 86), (87, 1, 87), (88, 1, 88), (89, 1, 89), (90, 1, 90), (91, 1, 91), (92, 1, 92), (93, 1, 93), (94, 1, 94), (95, 1, 95), (96, 1, 96), (97, 1, 97), (98, 1, 98), (99, 1, 99), (100, 1, 100), (101, 1, 101), (102, 1, 102), (103, 1, 103), (104, 1, 104), (105, 1, 105), (106, 1, 106), (107, 1, 107), (108, 1, 108), (109, 1, 109), (110, 1, 110), (111, 1, 111), (112, 1, 112), (113, 1, 113), (114, 1, 114), (115, 1, 115), (116, 1, 116), (117, 1, 117), (118, 1, 118), (119, 1, 119), (120, 1, 120), (121, 1, 121), (122, 1, 122), (123, 1, 123), (124, 1, 124), (125, 3, 11), (126, 3, 20), (127, 3, 21), (128, 3, 35); -- -------------------------------------------------------- -- -- Table structure for table `sections` -- CREATE TABLE IF NOT EXISTS `sections` ( `id` int(11) NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `academic_year_id` int(11) NOT NULL, `is_head_can_view` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `is_head_can_fill` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `is_member_can_view` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `is_member_can_fill` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `roles_can_view` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `roles_can_fill` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `from_date` date NOT NULL, `to_date` date NOT NULL, `template_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `sections_has_status` -- CREATE TABLE IF NOT EXISTS `sections_has_status` ( `id` int(11) NOT NULL, `academic_year_id` int(11) NOT NULL, `section_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `is_submitted` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `section_has_questions` -- CREATE TABLE IF NOT EXISTS `section_has_questions` ( `id` int(11) NOT NULL, `question` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `section_id` int(11) NOT NULL, `placeholder` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `question_type` enum('','SINGLE_LINE','MULTIPLE_LINE','RADIO_BUTTON','CHECKBOX','DROPDOWN','DATETIME','GRID','TABLE','NUMBER','ATTACHMENT') COLLATE utf8_unicode_ci NOT NULL, `grid_count` int(11) NOT NULL, `grid_table_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `special_question` enum('','UNIT','OVERALL_APPRAISAL','USER_DATA') COLLATE utf8_unicode_ci NOT NULL, `type` enum('','SELF','HEAD') COLLATE utf8_unicode_ci NOT NULL, `overall_appraisal_user_id` int(11) NOT NULL, `rank` int(11) NOT NULL, `added_on` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `section_question_has_options` -- CREATE TABLE IF NOT EXISTS `section_question_has_options` ( `id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `option` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `section_question_has_questions` -- CREATE TABLE IF NOT EXISTS `section_question_has_questions` ( `id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `question` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `is_remark` int(11) NOT NULL, `remark_checkpoint` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `is_na` int(11) NOT NULL, `options` int(11) NOT NULL, `rank` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `settings_approval_role` -- CREATE TABLE IF NOT EXISTS `settings_approval_role` ( `id` int(11) NOT NULL, `role_id` int(11) NOT NULL, `weight` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `settings_approval_workflow` -- CREATE TABLE IF NOT EXISTS `settings_approval_workflow` ( `id` int(11) NOT NULL, `settings_price_range_id` int(11) DEFAULT NULL, `role_id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `settings_price_range` -- CREATE TABLE IF NOT EXISTS `settings_price_range` ( `id` int(11) NOT NULL, `start_range` decimal(10,2) DEFAULT NULL, `end_range` decimal(10,2) DEFAULT NULL, `quotation_file_required` tinyint(1) DEFAULT NULL, `number_of_suppliers` tinyint(4) DEFAULT NULL, `ref_quotation_file_required` tinyint(1) DEFAULT NULL ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='<double-click to overwrite multiple objects>'; -- -------------------------------------------------------- -- -- Table structure for table `site_settings` -- CREATE TABLE IF NOT EXISTS `site_settings` ( `id` int(11) NOT NULL, `setting` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `site_settings` -- INSERT INTO `site_settings` (`id`, `setting`, `value`) VALUES (1, 'site_name', 'Camplus Admin'), (2, 'school_name', 'Proedge'), (3, 'school_logo_ext', 'jpg'), (4, 'modules', 'a:1:{s:7:"modules";a:7:{i:0;s:9:"appraisal";i:1;s:13:"event_booking";i:2;s:10:"facilities";i:3;s:16:"purchase_request";i:4;s:8:"supplier";i:5;s:5:"venue";i:6;s:4:"core";}}'), (5, 'google-client-id', ''), (6, 'google-client-secret', ''), (7, 'google-redirect', ''), (8, 'api_user', ''), (9, 'api_password', ''), (10, 'api_url', ''), (11, 'default_front_page', ''); -- -------------------------------------------------------- -- -- Table structure for table `suppliers` -- CREATE TABLE IF NOT EXISTS `suppliers` ( `id` int(11) NOT NULL, `supplier` varchar(100) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `supplier_alias` -- CREATE TABLE IF NOT EXISTS `supplier_alias` ( `id` int(11) NOT NULL, `host_id` int(11) NOT NULL, `alias_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `supplier_pic` -- CREATE TABLE IF NOT EXISTS `supplier_pic` ( `id` int(11) NOT NULL, `supplier_id` int(11) NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tel` int(15) DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `templates` -- CREATE TABLE IF NOT EXISTS `templates` ( `id` int(11) NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `added_on` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `time_slots` -- CREATE TABLE IF NOT EXISTS `time_slots` ( `id` int(11) NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `time_from` varchar(55) COLLATE utf8_unicode_ci NOT NULL, `time_to` varchar(55) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `units` -- CREATE TABLE IF NOT EXISTS `units` ( `id` int(11) NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `description` mediumtext COLLATE utf8_unicode_ci NOT NULL, `academic_year_id` int(11) NOT NULL, `category` int(11) NOT NULL, `template_id` int(11) NOT NULL, `added_on` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `unit_categories` -- CREATE TABLE IF NOT EXISTS `unit_categories` ( `id` int(11) NOT NULL, `category` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `unit_has_appraiser_heads` -- CREATE TABLE IF NOT EXISTS `unit_has_appraiser_heads` ( `id` int(11) NOT NULL, `unit_id` int(11) NOT NULL, `user_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `unit_has_heads` -- CREATE TABLE IF NOT EXISTS `unit_has_heads` ( `id` int(11) NOT NULL, `unit_id` int(11) NOT NULL, `user_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `unit_has_members` -- CREATE TABLE IF NOT EXISTS `unit_has_members` ( `id` int(11) NOT NULL, `unit_id` int(11) NOT NULL, `user_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `unit_has_questions` -- CREATE TABLE IF NOT EXISTS `unit_has_questions` ( `id` int(11) NOT NULL, `question` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `unit_id` int(11) NOT NULL, `placeholder` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `question_type` enum('SINGLE_LINE','MULTIPLE_LINE','RADIO_BUTTON','CHECKBOX','DROPDOWN','DATETIME','GRID','TABLE','NUMBER','ATTACHMENT') COLLATE utf8_unicode_ci NOT NULL, `grid_count` int(11) NOT NULL, `grid_table_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `rank` int(11) NOT NULL, `self` tinyint(4) NOT NULL, `head` tinyint(4) NOT NULL, `added_on` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `unit_question_has_options` -- CREATE TABLE IF NOT EXISTS `unit_question_has_options` ( `id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `option` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `unit_question_has_questions` -- CREATE TABLE IF NOT EXISTS `unit_question_has_questions` ( `id` int(11) NOT NULL, `question_id` int(11) NOT NULL, `question` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `is_remark` int(11) NOT NULL, `remark_checkpoint` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `is_na` int(11) NOT NULL, `options` int(11) NOT NULL, `rank` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL, `username` varchar(15) COLLATE utf8_unicode_ci NOT NULL, `email` varchar(45) COLLATE utf8_unicode_ci NOT NULL, `name_chinese` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `name_english` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `password` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `created_on` datetime NOT NULL, `service_commencement_date` date NOT NULL, `teaching_exp` int(11) NOT NULL, `last_logged_in` varchar(45) COLLATE utf8_unicode_ci NOT NULL, `status` enum('ACTIVE','BLOCKED') COLLATE utf8_unicode_ci NOT NULL, `front_page` text COLLATE utf8_unicode_ci NOT NULL, `oauth_provider` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `oauth_uid` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `gender` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `locale` varchar(10) COLLATE utf8_unicode_ci NOT NULL, `picture_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `profile_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `modified` datetime NOT NULL, `first_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `last_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `username`, `email`, `name_chinese`, `name_english`, `password`, `created_on`, `service_commencement_date`, `teaching_exp`, `last_logged_in`, `status`, `front_page`, `oauth_provider`, `oauth_uid`, `gender`, `locale`, `picture_url`, `profile_url`, `modified`, `first_name`, `last_name`) VALUES (1, 'admin', 'support@camplus.hk', '系統管理員', 'Admin User', 'e10adc3949ba59abbe56e057f20f883e', '2016-08-26 00:00:00', '0000-00-00', 0, '', 'ACTIVE', '', '', '', NULL, '', '', '', '0000-00-00 00:00:00', '', ''); -- -------------------------------------------------------- -- -- Table structure for table `users_group` -- CREATE TABLE IF NOT EXISTS `users_group` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `group_id` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `users_roles` -- CREATE TABLE IF NOT EXISTS `users_roles` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `role_id` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `users_roles` -- INSERT INTO `users_roles` (`id`, `user_id`, `role_id`) VALUES (1, 1, 1); -- -------------------------------------------------------- -- -- Table structure for table `user_has_educations` -- CREATE TABLE IF NOT EXISTS `user_has_educations` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `qualification` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `certificate` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `major` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `minor` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `institute` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `award_date` date NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `venues` -- CREATE TABLE IF NOT EXISTS `venues` ( `id` int(11) NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `venuegroup` int(11) NOT NULL, `remarks` mediumtext COLLATE utf8_unicode_ci NOT NULL, `order` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `venue_group` -- CREATE TABLE IF NOT EXISTS `venue_group` ( `id` int(11) NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Indexes for dumped tables -- -- -- Indexes for table `academic_years` -- ALTER TABLE `academic_years` ADD PRIMARY KEY (`id`); -- -- Indexes for table `answers` -- ALTER TABLE `answers` ADD PRIMARY KEY (`id`); -- -- Indexes for table `answer_has_grid` -- ALTER TABLE `answer_has_grid` ADD PRIMARY KEY (`id`); -- -- Indexes for table `answer_has_options` -- ALTER TABLE `answer_has_options` ADD PRIMARY KEY (`id`); -- -- Indexes for table `answer_has_table` -- ALTER TABLE `answer_has_table` ADD PRIMARY KEY (`id`); -- -- Indexes for table `ap_roles` -- ALTER TABLE `ap_roles` ADD PRIMARY KEY (`id`); -- -- Indexes for table `ap_users_roles` -- ALTER TABLE `ap_users_roles` ADD PRIMARY KEY (`id`), ADD KEY `role_id_idx` (`role_id`), ADD KEY `user_id_idx` (`user_id`); -- -- Indexes for table `budget_pool_keys` -- ALTER TABLE `budget_pool_keys` ADD PRIMARY KEY (`id`); -- -- Indexes for table `calendar_type` -- ALTER TABLE `calendar_type` ADD PRIMARY KEY (`id`); -- -- Indexes for table `calendar_type_has_forms` -- ALTER TABLE `calendar_type_has_forms` ADD PRIMARY KEY (`id`); -- -- Indexes for table `circulars` -- ALTER TABLE `circulars` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `id` (`id`); -- -- Indexes for table `circular_templates` -- ALTER TABLE `circular_templates` ADD PRIMARY KEY (`id`); -- -- Indexes for table `departments` -- ALTER TABLE `departments` ADD PRIMARY KEY (`id`); -- -- Indexes for table `department_budget_items` -- ALTER TABLE `department_budget_items` ADD PRIMARY KEY (`id`); -- -- Indexes for table `department_staffs` -- ALTER TABLE `department_staffs` ADD PRIMARY KEY (`id`); -- -- Indexes for table `eb_facilities` -- ALTER TABLE `eb_facilities` ADD PRIMARY KEY (`id`); -- -- Indexes for table `eb_settings` -- ALTER TABLE `eb_settings` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `SETTING_KEY_UNIQUE` (`key`); -- -- Indexes for table `eb_venues` -- ALTER TABLE `eb_venues` ADD PRIMARY KEY (`id`); -- -- Indexes for table `events` -- ALTER TABLE `events` ADD PRIMARY KEY (`id`), ADD KEY `status` (`status`), ADD KEY `calendar_type_id` (`calendar_type_id`); -- -- Indexes for table `event_forms_history` -- ALTER TABLE `event_forms_history` ADD PRIMARY KEY (`id`); -- -- Indexes for table `event_has_files` -- ALTER TABLE `event_has_files` ADD PRIMARY KEY (`id`); -- -- Indexes for table `event_has_forms` -- ALTER TABLE `event_has_forms` ADD PRIMARY KEY (`id`); -- -- Indexes for table `event_has_sections` -- ALTER TABLE `event_has_sections` ADD PRIMARY KEY (`id`), ADD KEY `event_id` (`event_id`), ADD KEY `startDate` (`startDate`), ADD KEY `from_time` (`from_time`), ADD KEY `to_time` (`to_time`); -- -- Indexes for table `event_section_has_facilities` -- ALTER TABLE `event_section_has_facilities` ADD PRIMARY KEY (`id`), ADD KEY `section_id` (`section_id`); -- -- Indexes for table `event_section_has_participants` -- ALTER TABLE `event_section_has_participants` ADD PRIMARY KEY (`id`), ADD KEY `section_id` (`section_id`); -- -- Indexes for table `event_section_has_venues` -- ALTER TABLE `event_section_has_venues` ADD PRIMARY KEY (`id`), ADD KEY `section_id` (`section_id`), ADD KEY `venue_id` (`venue_id`); -- -- Indexes for table `event_types` -- ALTER TABLE `event_types` ADD PRIMARY KEY (`id`); -- -- Indexes for table `facilities` -- ALTER TABLE `facilities` ADD PRIMARY KEY (`id`); -- -- Indexes for table `financial_years` -- ALTER TABLE `financial_years` ADD PRIMARY KEY (`id`); -- -- Indexes for table `forms` -- ALTER TABLE `forms` ADD PRIMARY KEY (`id`); -- -- Indexes for table `form_answers` -- ALTER TABLE `form_answers` ADD PRIMARY KEY (`id`); -- -- Indexes for table `form_answer_has_grid` -- ALTER TABLE `form_answer_has_grid` ADD PRIMARY KEY (`id`); -- -- Indexes for table `form_answer_has_table` -- ALTER TABLE `form_answer_has_table` ADD PRIMARY KEY (`id`); -- -- Indexes for table `form_has_questions` -- ALTER TABLE `form_has_questions` ADD PRIMARY KEY (`id`); -- -- Indexes for table `form_question_has_options` -- ALTER TABLE `form_question_has_options` ADD PRIMARY KEY (`id`); -- -- Indexes for table `form_question_has_questions` -- ALTER TABLE `form_question_has_questions` ADD PRIMARY KEY (`id`); -- -- Indexes for table `form_question_has_token` -- ALTER TABLE `form_question_has_token` ADD PRIMARY KEY (`id`); -- -- Indexes for table `groups` -- ALTER TABLE `groups` ADD PRIMARY KEY (`id`); -- -- Indexes for table `hr_settings` -- ALTER TABLE `hr_settings` ADD PRIMARY KEY (`id`); -- -- Indexes for table `lb_book_info` -- ALTER TABLE `lb_book_info` ADD PRIMARY KEY (`id`), ADD KEY `isbn` (`isbn`); -- -- Indexes for table `lb_category` -- ALTER TABLE `lb_category` ADD PRIMARY KEY (`id`); -- -- Indexes for table `lb_circulation` -- ALTER TABLE `lb_circulation` ADD PRIMARY KEY (`id`); -- -- Indexes for table `lb_circulation_config` -- ALTER TABLE `lb_circulation_config` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `member_type_id` (`member_type_id`); -- -- Indexes for table `lb_daily_read_material` -- ALTER TABLE `lb_daily_read_material` ADD PRIMARY KEY (`id`); -- -- Indexes for table `lb_email_config` -- ALTER TABLE `lb_email_config` ADD PRIMARY KEY (`id`); -- -- Indexes for table `lb_forget_password` -- ALTER TABLE `lb_forget_password` ADD PRIMARY KEY (`id`); -- -- Indexes for table `lb_member` -- ALTER TABLE `lb_member` ADD PRIMARY KEY (`id`); -- -- Indexes for table `lb_member_type` -- ALTER TABLE `lb_member_type` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `member_type_name` (`member_type_name`,`deleted`); -- -- Indexes for table `lb_request_book` -- ALTER TABLE `lb_request_book` ADD PRIMARY KEY (`id`); -- -- Indexes for table `lb_sms_config` -- ALTER TABLE `lb_sms_config` ADD PRIMARY KEY (`id`); -- -- Indexes for table `lb_sms_email_history` -- ALTER TABLE `lb_sms_email_history` ADD PRIMARY KEY (`id`); -- -- Indexes for table `lb_terms_and_condition` -- ALTER TABLE `lb_terms_and_condition` ADD PRIMARY KEY (`id`); -- -- Indexes for table `msg_messages` -- ALTER TABLE `msg_messages` ADD PRIMARY KEY (`id`); -- -- Indexes for table `msg_participants` -- ALTER TABLE `msg_participants` ADD PRIMARY KEY (`user_id`,`thread_id`); -- -- Indexes for table `msg_status` -- ALTER TABLE `msg_status` ADD PRIMARY KEY (`message_id`,`user_id`); -- -- Indexes for table `msg_threads` -- ALTER TABLE `msg_threads` ADD PRIMARY KEY (`id`); -- -- Indexes for table `overall_appraisals` -- ALTER TABLE `overall_appraisals` ADD PRIMARY KEY (`id`); -- -- Indexes for table `overall_appraisal_has_questions` -- ALTER TABLE `overall_appraisal_has_questions` ADD PRIMARY KEY (`id`); -- -- Indexes for table `overall_appraisal_question_has_options` -- ALTER TABLE `overall_appraisal_question_has_options` ADD PRIMARY KEY (`id`); -- -- Indexes for table `overall_appraisal_question_has_questions` -- ALTER TABLE `overall_appraisal_question_has_questions` ADD PRIMARY KEY (`id`); -- -- Indexes for table `overall_appraisal_workflow` -- ALTER TABLE `overall_appraisal_workflow` ADD PRIMARY KEY (`id`); -- -- Indexes for table `participants` -- ALTER TABLE `participants` ADD PRIMARY KEY (`id`); -- -- Indexes for table `participants_has_groups` -- ALTER TABLE `participants_has_groups` ADD PRIMARY KEY (`id`); -- -- Indexes for table `participant_group` -- ALTER TABLE `participant_group` ADD PRIMARY KEY (`id`); -- -- Indexes for table `permissions` -- ALTER TABLE `permissions` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `permission_title_UNIQUE` (`permission_title`), ADD UNIQUE KEY `permission_key_UNIQUE` (`permission_key`); -- -- Indexes for table `pr_approval_status` -- ALTER TABLE `pr_approval_status` ADD PRIMARY KEY (`id`), ADD KEY `purchase_request_id_idx` (`purchase_request_id`), ADD KEY `waiting_for_approval_by_idx` (`approval_role_id`); -- -- Indexes for table `pr_budget_items` -- ALTER TABLE `pr_budget_items` ADD PRIMARY KEY (`id`), ADD KEY `budget_item_id_idx` (`department_budget_item_id`), ADD KEY `purchase_request_id_idx` (`purchase_request_id`); -- -- Indexes for table `pr_has_referenec_supplier` -- ALTER TABLE `pr_has_referenec_supplier` ADD PRIMARY KEY (`id`); -- -- Indexes for table `pr_has_sub_items` -- ALTER TABLE `pr_has_sub_items` ADD PRIMARY KEY (`id`); -- -- Indexes for table `pr_settings` -- ALTER TABLE `pr_settings` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `SETTING_KEY_UNIQUE` (`key`); -- -- Indexes for table `purchase_request` -- ALTER TABLE `purchase_request` ADD PRIMARY KEY (`id`), ADD KEY `applicant_id_idx` (`applicant_id`), ADD KEY `submited_by_idx` (`submitted_by`), ADD KEY `chosen_supplier_id_idx` (`chosen_supplier_id`), ADD KEY `item_name` (`item_name`), ADD KEY `item_name_2` (`item_name`), ADD KEY `applicant_id` (`applicant_id`), ADD KEY `submitted_by` (`submitted_by`), ADD KEY `chosen_price` (`chosen_price`), ADD KEY `voucher_number` (`voucher_number`), ADD KEY `status` (`status`), ADD KEY `payment_method` (`payment_method`), ADD KEY `chosen_price_2` (`chosen_price`); -- -- Indexes for table `purchase_request_history` -- ALTER TABLE `purchase_request_history` ADD PRIMARY KEY (`id`), ADD KEY `purchase_request_id` (`purchase_request_id`), ADD KEY `status` (`status`), ADD KEY `is_approve_action` (`is_approve_action`), ADD KEY `updated_on` (`updated_on`); -- -- Indexes for table `questions` -- ALTER TABLE `questions` ADD PRIMARY KEY (`id`); -- -- Indexes for table `question_has_options` -- ALTER TABLE `question_has_options` ADD PRIMARY KEY (`id`); -- -- Indexes for table `question_has_questions` -- ALTER TABLE `question_has_questions` ADD PRIMARY KEY (`id`); -- -- Indexes for table `reference_supplier_info` -- ALTER TABLE `reference_supplier_info` ADD PRIMARY KEY (`id`); -- -- Indexes for table `roles` -- ALTER TABLE `roles` ADD PRIMARY KEY (`id`), ADD KEY `role` (`role`); -- -- Indexes for table `roles_permission` -- ALTER TABLE `roles_permission` ADD PRIMARY KEY (`id`), ADD KEY `role_id_idx` (`role_id`), ADD KEY `permission_id_idx` (`permission_id`); -- -- Indexes for table `sections` -- ALTER TABLE `sections` ADD PRIMARY KEY (`id`); -- -- Indexes for table `sections_has_status` -- ALTER TABLE `sections_has_status` ADD PRIMARY KEY (`id`); -- -- Indexes for table `section_has_questions` -- ALTER TABLE `section_has_questions` ADD PRIMARY KEY (`id`); -- -- Indexes for table `section_question_has_options` -- ALTER TABLE `section_question_has_options` ADD PRIMARY KEY (`id`); -- -- Indexes for table `section_question_has_questions` -- ALTER TABLE `section_question_has_questions` ADD PRIMARY KEY (`id`); -- -- Indexes for table `settings_approval_role` -- ALTER TABLE `settings_approval_role` ADD PRIMARY KEY (`id`), ADD KEY `role_id` (`role_id`); -- -- Indexes for table `settings_approval_workflow` -- ALTER TABLE `settings_approval_workflow` ADD PRIMARY KEY (`id`), ADD KEY `price_range_id_idx` (`settings_price_range_id`), ADD KEY `role_id_idx` (`role_id`); -- -- Indexes for table `settings_price_range` -- ALTER TABLE `settings_price_range` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `start_range_UNIQUE` (`start_range`), ADD UNIQUE KEY `end_range_UNIQUE` (`end_range`); -- -- Indexes for table `site_settings` -- ALTER TABLE `site_settings` ADD PRIMARY KEY (`id`); -- -- Indexes for table `suppliers` -- ALTER TABLE `suppliers` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `supplier` (`supplier`); -- -- Indexes for table `supplier_alias` -- ALTER TABLE `supplier_alias` ADD PRIMARY KEY (`id`); -- -- Indexes for table `supplier_pic` -- ALTER TABLE `supplier_pic` ADD PRIMARY KEY (`id`); -- -- Indexes for table `templates` -- ALTER TABLE `templates` ADD PRIMARY KEY (`id`); -- -- Indexes for table `time_slots` -- ALTER TABLE `time_slots` ADD PRIMARY KEY (`id`); -- -- Indexes for table `units` -- ALTER TABLE `units` ADD PRIMARY KEY (`id`); -- -- Indexes for table `unit_categories` -- ALTER TABLE `unit_categories` ADD PRIMARY KEY (`id`); -- -- Indexes for table `unit_has_appraiser_heads` -- ALTER TABLE `unit_has_appraiser_heads` ADD PRIMARY KEY (`id`); -- -- Indexes for table `unit_has_heads` -- ALTER TABLE `unit_has_heads` ADD PRIMARY KEY (`id`); -- -- Indexes for table `unit_has_members` -- ALTER TABLE `unit_has_members` ADD PRIMARY KEY (`id`); -- -- Indexes for table `unit_has_questions` -- ALTER TABLE `unit_has_questions` ADD PRIMARY KEY (`id`); -- -- Indexes for table `unit_question_has_options` -- ALTER TABLE `unit_question_has_options` ADD PRIMARY KEY (`id`); -- -- Indexes for table `unit_question_has_questions` -- ALTER TABLE `unit_question_has_questions` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users_group` -- ALTER TABLE `users_group` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users_roles` -- ALTER TABLE `users_roles` ADD PRIMARY KEY (`id`), ADD KEY `role_id_idx` (`role_id`), ADD KEY `user_id_idx` (`user_id`); -- -- Indexes for table `user_has_educations` -- ALTER TABLE `user_has_educations` ADD PRIMARY KEY (`id`); -- -- Indexes for table `venues` -- ALTER TABLE `venues` ADD PRIMARY KEY (`id`); -- -- Indexes for table `venue_group` -- ALTER TABLE `venue_group` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `academic_years` -- ALTER TABLE `academic_years` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `answers` -- ALTER TABLE `answers` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `answer_has_grid` -- ALTER TABLE `answer_has_grid` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `answer_has_options` -- ALTER TABLE `answer_has_options` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `answer_has_table` -- ALTER TABLE `answer_has_table` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `ap_roles` -- ALTER TABLE `ap_roles` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `ap_users_roles` -- ALTER TABLE `ap_users_roles` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `budget_pool_keys` -- ALTER TABLE `budget_pool_keys` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `calendar_type` -- ALTER TABLE `calendar_type` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `calendar_type_has_forms` -- ALTER TABLE `calendar_type_has_forms` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `circulars` -- ALTER TABLE `circulars` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `circular_templates` -- ALTER TABLE `circular_templates` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `departments` -- ALTER TABLE `departments` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `department_budget_items` -- ALTER TABLE `department_budget_items` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `department_staffs` -- ALTER TABLE `department_staffs` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `eb_facilities` -- ALTER TABLE `eb_facilities` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `eb_settings` -- ALTER TABLE `eb_settings` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `eb_venues` -- ALTER TABLE `eb_venues` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `events` -- ALTER TABLE `events` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `event_forms_history` -- ALTER TABLE `event_forms_history` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `event_has_files` -- ALTER TABLE `event_has_files` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `event_has_forms` -- ALTER TABLE `event_has_forms` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `event_has_sections` -- ALTER TABLE `event_has_sections` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `event_section_has_facilities` -- ALTER TABLE `event_section_has_facilities` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `event_section_has_participants` -- ALTER TABLE `event_section_has_participants` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `event_section_has_venues` -- ALTER TABLE `event_section_has_venues` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `event_types` -- ALTER TABLE `event_types` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `facilities` -- ALTER TABLE `facilities` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `financial_years` -- ALTER TABLE `financial_years` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `forms` -- ALTER TABLE `forms` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `form_answers` -- ALTER TABLE `form_answers` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `form_answer_has_grid` -- ALTER TABLE `form_answer_has_grid` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `form_answer_has_table` -- ALTER TABLE `form_answer_has_table` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `form_has_questions` -- ALTER TABLE `form_has_questions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `form_question_has_options` -- ALTER TABLE `form_question_has_options` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `form_question_has_questions` -- ALTER TABLE `form_question_has_questions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `form_question_has_token` -- ALTER TABLE `form_question_has_token` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `groups` -- ALTER TABLE `groups` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=38; -- -- AUTO_INCREMENT for table `hr_settings` -- ALTER TABLE `hr_settings` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `lb_book_info` -- ALTER TABLE `lb_book_info` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `lb_category` -- ALTER TABLE `lb_category` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `lb_circulation` -- ALTER TABLE `lb_circulation` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `lb_circulation_config` -- ALTER TABLE `lb_circulation_config` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `lb_daily_read_material` -- ALTER TABLE `lb_daily_read_material` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `lb_email_config` -- ALTER TABLE `lb_email_config` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `lb_forget_password` -- ALTER TABLE `lb_forget_password` MODIFY `id` int(12) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `lb_member` -- ALTER TABLE `lb_member` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `lb_member_type` -- ALTER TABLE `lb_member_type` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `lb_request_book` -- ALTER TABLE `lb_request_book` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `lb_sms_config` -- ALTER TABLE `lb_sms_config` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `lb_sms_email_history` -- ALTER TABLE `lb_sms_email_history` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `lb_terms_and_condition` -- ALTER TABLE `lb_terms_and_condition` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `msg_messages` -- ALTER TABLE `msg_messages` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `msg_threads` -- ALTER TABLE `msg_threads` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `overall_appraisals` -- ALTER TABLE `overall_appraisals` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `overall_appraisal_has_questions` -- ALTER TABLE `overall_appraisal_has_questions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `overall_appraisal_question_has_options` -- ALTER TABLE `overall_appraisal_question_has_options` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `overall_appraisal_question_has_questions` -- ALTER TABLE `overall_appraisal_question_has_questions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `overall_appraisal_workflow` -- ALTER TABLE `overall_appraisal_workflow` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `participants` -- ALTER TABLE `participants` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `participants_has_groups` -- ALTER TABLE `participants_has_groups` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `participant_group` -- ALTER TABLE `participant_group` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `permissions` -- ALTER TABLE `permissions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=126; -- -- AUTO_INCREMENT for table `pr_approval_status` -- ALTER TABLE `pr_approval_status` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `pr_budget_items` -- ALTER TABLE `pr_budget_items` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `pr_has_referenec_supplier` -- ALTER TABLE `pr_has_referenec_supplier` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `pr_has_sub_items` -- ALTER TABLE `pr_has_sub_items` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `pr_settings` -- ALTER TABLE `pr_settings` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `purchase_request` -- ALTER TABLE `purchase_request` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `purchase_request_history` -- ALTER TABLE `purchase_request_history` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `questions` -- ALTER TABLE `questions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `question_has_options` -- ALTER TABLE `question_has_options` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `question_has_questions` -- ALTER TABLE `question_has_questions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `reference_supplier_info` -- ALTER TABLE `reference_supplier_info` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `roles` -- ALTER TABLE `roles` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=10; -- -- AUTO_INCREMENT for table `roles_permission` -- ALTER TABLE `roles_permission` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=273; -- -- AUTO_INCREMENT for table `sections` -- ALTER TABLE `sections` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `sections_has_status` -- ALTER TABLE `sections_has_status` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `section_has_questions` -- ALTER TABLE `section_has_questions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `section_question_has_options` -- ALTER TABLE `section_question_has_options` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `section_question_has_questions` -- ALTER TABLE `section_question_has_questions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `settings_approval_role` -- ALTER TABLE `settings_approval_role` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `settings_approval_workflow` -- ALTER TABLE `settings_approval_workflow` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `settings_price_range` -- ALTER TABLE `settings_price_range` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `site_settings` -- ALTER TABLE `site_settings` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=12; -- -- AUTO_INCREMENT for table `suppliers` -- ALTER TABLE `suppliers` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=29; -- -- AUTO_INCREMENT for table `supplier_alias` -- ALTER TABLE `supplier_alias` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `supplier_pic` -- ALTER TABLE `supplier_pic` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11; -- -- AUTO_INCREMENT for table `templates` -- ALTER TABLE `templates` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `time_slots` -- ALTER TABLE `time_slots` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `units` -- ALTER TABLE `units` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `unit_categories` -- ALTER TABLE `unit_categories` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `unit_has_appraiser_heads` -- ALTER TABLE `unit_has_appraiser_heads` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `unit_has_heads` -- ALTER TABLE `unit_has_heads` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `unit_has_members` -- ALTER TABLE `unit_has_members` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `unit_has_questions` -- ALTER TABLE `unit_has_questions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `unit_question_has_options` -- ALTER TABLE `unit_question_has_options` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `unit_question_has_questions` -- ALTER TABLE `unit_question_has_questions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=17; -- -- AUTO_INCREMENT for table `users_group` -- ALTER TABLE `users_group` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `users_roles` -- ALTER TABLE `users_roles` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=14; -- -- AUTO_INCREMENT for table `user_has_educations` -- ALTER TABLE `user_has_educations` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `venues` -- ALTER TABLE `venues` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=71; -- -- AUTO_INCREMENT for table `venue_group` -- ALTER TABLE `venue_group` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=9; /*!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 */;
| ver. 1.4 |
Github
|
.
| PHP 7.2.34 | Generation time: 0.26 |
proxy
|
phpinfo
|
Settings