    CREATE TABLE `ohrm_leave_calendar_legend_color` (
      `id` int unsigned not null auto_increment,
      `leave_type_id` int unsigned not null,
      `legend_color` int unsigned,
      PRIMARY KEY(`id`),
      UNIQUE KEY(`leave_type_id`),
      FOREIGN KEY(`leave_type_id`) REFERENCES `ohrm_leave_type`(`id`) ON DELETE CASCADE
    ) engine=innodb default charset=utf8;

    CREATE TABLE `ohrm_audittrail_all` (
        `id` BIGINT AUTO_INCREMENT,
        `action_time` DATETIME,
        `action_owner_id` VARCHAR(6),
        `action_owner_name` TEXT,
        `version_id` BIGINT,
        `affected_entity_id` VARCHAR(20),
        `affected_entity_name` TEXT,
        `action` TEXT,
        `action_description` TEXT,
        `section` TEXT,
        PRIMARY KEY(`id`)
    ) ENGINE = INNODB;

    SET @mobile_employee_attendance_records_screen_id := (SELECT `id` FROM `ohrm_screen` WHERE `name` = 'Mobile Employee Attendance Records');
    SET @mobile_assign_leave_screen_id := (SELECT `id` FROM `ohrm_screen` WHERE `name` = 'Mobile Assign Leave');
    SET @mobile_assign_leave_advanced_screen_id := (SELECT `id` FROM `ohrm_screen` WHERE `name` = 'Mobile Assign Leave Advanced');
    SET @mobile_employee_leave_list_screen_id := (SELECT `id` FROM `ohrm_screen` WHERE `name` = 'Mobile Employee Leave List');
    SET @mobile_view_employee_list_screen_id := (SELECT `id` FROM `ohrm_screen` WHERE `name` = 'Mobile View Employee List');
    SET @mobile_view_personal_details_screen_id := (SELECT `id` FROM `ohrm_screen` WHERE `name` = 'Mobile View Personal Details');
    SET @hod_user_role_id :=(SELECT `id` FROM `ohrm_user_role` WHERE `name`='HeadOfDepartment');

    INSERT INTO `ohrm_user_role_screen` (`user_role_id`, `screen_id`, `can_read`, `can_create`, `can_update`, `can_delete`) VALUES 
        (@hod_user_role_id, @mobile_employee_attendance_records_screen_id, 1, 1, 0, 0),
        (@hod_user_role_id, @mobile_assign_leave_screen_id, 1, 1, 1, 0),
        (@hod_user_role_id, @mobile_assign_leave_advanced_screen_id, 1, 1, 1, 0),
        (@hod_user_role_id, @mobile_employee_leave_list_screen_id, 1, 1, 1, 0),
        (@hod_user_role_id, @mobile_view_employee_list_screen_id, 1, 0, 0, 0),
        (@hod_user_role_id, @mobile_view_personal_details_screen_id, 1, 0, 0, 0);

    INSERT INTO `ohrm_data_group` (`name`, `description`, `can_read`, `can_create`, `can_update`, `can_delete`) VALUES
        ('recruitment_reports', 'Recruitment - Reports', 1, 1, 1, 1);
    SET @vacancy_reports_data_group_id := (SELECT `id` FROM `ohrm_data_group` WHERE `name` = 'recruitment_reports');
    INSERT INTO `ohrm_user_role_data_group` (`user_role_id`, `data_group_id`, `can_read`, `can_create`, `can_update`, `can_delete`, `self`) VALUES
        (1, @vacancy_reports_data_group_id, 1, 0, 0, 0, 0);
    INSERT INTO ohrm_user_role_type_data_group(`user_role_type_id`, `data_group_id`) VALUES
        (1, @vacancy_reports_data_group_id);

    SET @vacancy_succession_report_id := (SELECT `report_id` FROM `ohrm_report` WHERE `name` = 'Vacancy Succession Report');
    SET @recruitment_module_id := (SELECT `id` FROM `ohrm_module` WHERE `name` = 'recruitment');

    SET @recruitment_module_screen_id := (SELECT `id` FROM `ohrm_screen` WHERE `action_url` = 'viewRecruitmentModule');
    SET @employee_vacancy_report_screen_id := (SELECT `id` FROM `ohrm_screen` WHERE `name` = 'Vacancy Succession Report');
    INSERT INTO `ohrm_data_group_screen`(`data_group_id`, `screen_id`, `permission`) VALUES
        (@vacancy_reports_data_group_id, @employee_vacancy_report_screen_id, 1),
        (@vacancy_reports_data_group_id, @recruitment_module_screen_id, 1);