ALTER table ohrm_screen ADD COLUMN `route_name` varchar(255) default null;

--
-- query used to generate sql:
-- select CONCAT('route_name = \'', ohrm_screen.route_name, '\' WHERE module_id = @module_', ohrm_module.name, ' AND action_url = \'', ohrm_screen.action_url, '\'')  from ohrm_screen left join ohrm_module on ohrm_module.id = ohrm_screen.module_id where ohrm_screen.id in (select screen_id from ohrm_menu_item where menu_category is null and uisref is null) order by ohrm_module.name, ohrm_screen.action_url;
--
SET @module_admin := (SELECT id FROM ohrm_module WHERE name = 'admin');
SET @module_asset := (SELECT id FROM ohrm_module WHERE name = 'asset');
SET @module_attendance := (SELECT id FROM ohrm_module WHERE name = 'attendance');
SET @module_buzz := (SELECT id FROM ohrm_module WHERE name = 'buzz');
SET @module_bulkdata := (SELECT id FROM ohrm_module WHERE name = 'bulkdata');
SET @module_directory := (SELECT id FROM ohrm_module WHERE name = 'directory');
SET @module_discipline := (SELECT id FROM ohrm_module WHERE name = 'discipline');
SET @module_expense := (SELECT id FROM ohrm_module WHERE name = 'expense');
SET @module_leave := (SELECT id FROM ohrm_module WHERE name = 'leave');
SET @module_license := (SELECT id FROM ohrm_module WHERE name = 'license');
SET @module_managementtool_notship := (SELECT id FROM ohrm_module WHERE name = 'managementtool_notship');
SET @module_news := (SELECT id FROM ohrm_module WHERE name = 'news');
SET @module_onboarding := (SELECT id FROM ohrm_module WHERE name = 'onboarding');
SET @module_orgChart := (SELECT id FROM ohrm_module WHERE name = 'orgChart');
SET @module_performance := (SELECT id FROM ohrm_module WHERE name = 'performance');
SET @module_performanceTracker := (SELECT id FROM ohrm_module WHERE name = 'performanceTracker');
SET @module_recruitment := (SELECT id FROM ohrm_module WHERE name = 'recruitment');
SET @module_time := (SELECT id FROM ohrm_module WHERE name = 'time');
SET @module_training := (SELECT id FROM ohrm_module WHERE name = 'training');

UPDATE ohrm_screen SET route_name = 'admin_exportConfiguration' WHERE module_id = @module_admin AND action_url = 'exportConfiguration';
UPDATE ohrm_screen SET route_name = 'admin_getEmployeeCompetencyList' WHERE module_id = @module_admin AND action_url = 'getEmployeeCompetencyList';
UPDATE ohrm_screen SET route_name = 'admin_imageUploader' WHERE module_id = @module_admin AND action_url = 'imageUploader';
UPDATE ohrm_screen SET route_name = 'admin_importConfiguration' WHERE module_id = @module_admin AND action_url = 'importConfiguration';
UPDATE ohrm_screen SET route_name = 'admin_registerOAuthClient' WHERE module_id = @module_admin AND action_url = 'registerOAuthClient';
UPDATE ohrm_screen SET route_name = 'admin_themeBuilder' WHERE module_id = @module_admin AND action_url = 'themeBuilder';
UPDATE ohrm_screen SET route_name = 'admin_viewDirectoryConfig' WHERE module_id = @module_admin AND action_url = 'viewDirectoryConfig';
UPDATE ohrm_screen SET route_name = 'asset_viewAssets' WHERE module_id = @module_asset AND action_url = 'viewAssets';
UPDATE ohrm_screen SET route_name = 'asset_viewBrands' WHERE module_id = @module_asset AND action_url = 'viewBrands';
UPDATE ohrm_screen SET route_name = 'asset_viewCategories' WHERE module_id = @module_asset AND action_url = 'viewCategories';
UPDATE ohrm_screen SET route_name = 'asset_viewUserAssetList' WHERE module_id = @module_asset AND action_url = 'viewUserAssetList';
UPDATE ohrm_screen SET route_name = 'asset_viewVendorList' WHERE module_id = @module_asset AND action_url = 'viewVendorList';
UPDATE ohrm_screen SET route_name = 'attendance_AttendanceFileUpload' WHERE module_id = @module_attendance AND action_url = 'AttendanceFileUpload';
UPDATE ohrm_screen SET route_name = 'attendance_configure' WHERE module_id = @module_attendance AND action_url = 'configure';
UPDATE ohrm_screen SET route_name = 'attendance_punchIn' WHERE module_id = @module_attendance AND action_url = 'punchIn';
UPDATE ohrm_screen SET route_name = 'attendance_viewAttendanceDataExtract' WHERE module_id = @module_attendance AND action_url = 'viewAttendanceDataExtract';
UPDATE ohrm_screen SET route_name = 'attendance_viewAttendanceRecord' WHERE module_id = @module_attendance AND action_url = 'viewAttendanceRecord';
UPDATE ohrm_screen SET route_name = 'attendance_viewMyAttendanceRecord' WHERE module_id = @module_attendance AND action_url = 'viewMyAttendanceRecord';
UPDATE ohrm_screen SET route_name = 'bulkdata_main' WHERE module_id = @module_bulkdata AND action_url = 'main';
UPDATE ohrm_screen SET route_name = 'buzz_viewBuzz' WHERE module_id = @module_buzz AND action_url = 'viewBuzz';
UPDATE ohrm_screen SET route_name = 'directory_viewDirectory' WHERE module_id = @module_directory AND action_url = 'viewDirectory';
UPDATE ohrm_screen SET route_name = 'discipline_defaultDisciplinaryView' WHERE module_id = @module_discipline AND action_url = 'defaultDisciplinaryView';
UPDATE ohrm_screen SET route_name = 'discipline_viewDisciplinaryCases' WHERE module_id = @module_discipline AND action_url = 'viewDisciplinaryCases';
UPDATE ohrm_screen SET route_name = 'discipline_viewDisciplinaryDocumentTemplates' WHERE module_id = @module_discipline AND action_url = 'viewDisciplinaryDocumentTemplates';
UPDATE ohrm_screen SET route_name = 'discipline_viewMyActions' WHERE module_id = @module_discipline AND action_url = 'viewMyActions';
UPDATE ohrm_screen SET route_name = 'expense_viewCurrencyExchangeRate' WHERE module_id = @module_expense AND action_url = 'viewCurrencyExchangeRate';
UPDATE ohrm_screen SET route_name = 'expense_viewEmployeeEstimateRequest' WHERE module_id = @module_expense AND action_url = 'viewEmployeeEstimateRequest';
UPDATE ohrm_screen SET route_name = 'expense_viewEmployeeGroup' WHERE module_id = @module_expense AND action_url = 'viewEmployeeGroup';
UPDATE ohrm_screen SET route_name = 'expense_viewEstimateRequest' WHERE module_id = @module_expense AND action_url = 'viewEstimateRequest';
UPDATE ohrm_screen SET route_name = 'expense_viewExpenseClaims' WHERE module_id = @module_expense AND action_url = 'viewExpenseClaims';
UPDATE ohrm_screen SET route_name = 'expense_viewExpenseModule' WHERE module_id = @module_expense AND action_url = 'viewExpenseModule';
UPDATE ohrm_screen SET route_name = 'expense_viewExpenseType' WHERE module_id = @module_expense AND action_url = 'viewExpenseType';
UPDATE ohrm_screen SET route_name = 'expense_viewMyExpenseClaims' WHERE module_id = @module_expense AND action_url = 'viewMyExpenseClaims';
UPDATE ohrm_screen SET route_name = 'leave_bradfordFactorThreshold' WHERE module_id = @module_leave AND action_url = 'bradfordFactorThreshold';
UPDATE ohrm_screen SET route_name = 'leave_viewWorkingWeekendList' WHERE module_id = @module_leave AND action_url = 'viewWorkingWeekendList';
UPDATE ohrm_screen SET route_name = 'license_addLicense' WHERE module_id = @module_license AND action_url = 'addLicense';
UPDATE ohrm_screen SET route_name = 'managementtool_notship_viewCronTasks' WHERE module_id = @module_managementtool_notship AND action_url = 'viewCronTasks';
UPDATE ohrm_screen SET route_name = 'news_viewAnnouncementModule' WHERE module_id = @module_news AND action_url = 'viewAnnouncementModule';
UPDATE ohrm_screen SET route_name = 'news_viewCategoryList' WHERE module_id = @module_news AND action_url = 'viewCategoryList';
UPDATE ohrm_screen SET route_name = 'news_viewDocumentArticle' WHERE module_id = @module_news AND action_url = 'viewDocumentArticle';
UPDATE ohrm_screen SET route_name = 'news_viewDocumentList' WHERE module_id = @module_news AND action_url = 'viewDocumentList';
UPDATE ohrm_screen SET route_name = 'news_viewNewsArticles' WHERE module_id = @module_news AND action_url = 'viewNewsArticles';
UPDATE ohrm_screen SET route_name = 'news_viewNewsList' WHERE module_id = @module_news AND action_url = 'viewNewsList';
UPDATE ohrm_screen SET route_name = 'onboarding_defaultMenuView' WHERE module_id = @module_onboarding AND action_url = 'defaultMenuView';
UPDATE ohrm_screen SET route_name = 'onboarding_viewEmployeeTasks' WHERE module_id = @module_onboarding AND action_url = 'viewEmployeeTasks';
UPDATE ohrm_screen SET route_name = 'onboarding_viewJobs' WHERE module_id = @module_onboarding AND action_url = 'viewJobs';
UPDATE ohrm_screen SET route_name = 'onboarding_viewMyJobs' WHERE module_id = @module_onboarding AND action_url = 'viewMyJobs';
UPDATE ohrm_screen SET route_name = 'onboarding_viewMyTasks' WHERE module_id = @module_onboarding AND action_url = 'viewMyTasks';
UPDATE ohrm_screen SET route_name = 'onboarding_viewTaskTypes' WHERE module_id = @module_onboarding AND action_url = 'viewTaskTypes';
UPDATE ohrm_screen SET route_name = 'orgchart_configReportingMethod' WHERE module_id = @module_orgChart AND action_url = 'configReportingMethod';
UPDATE ohrm_screen SET route_name = 'orgchart_defineJobTitleHierarchy' WHERE module_id = @module_orgChart AND action_url = 'defineJobTitleHierarchy';
UPDATE ohrm_screen SET route_name = 'orgchart_orgchartView' WHERE module_id = @module_orgChart AND action_url = 'orgchartView';
UPDATE ohrm_screen SET route_name = 'performance_competencyEmployeeGroups' WHERE module_id = @module_performance AND action_url = 'competencyEmployeeGroups';
UPDATE ohrm_screen SET route_name = 'performance_defaultAppraisalConfiguration' WHERE module_id = @module_performance AND action_url = 'defaultAppraisalConfiguration';
UPDATE ohrm_screen SET route_name = 'performance_myGoals' WHERE module_id = @module_performance AND action_url = 'myGoals';
UPDATE ohrm_screen SET route_name = 'performance_viewAppraisalCycles' WHERE module_id = @module_performance AND action_url = 'viewAppraisalCycles';
UPDATE ohrm_screen SET route_name = 'performance_viewEmployeeGoalList' WHERE module_id = @module_performance AND action_url = 'viewEmployeeGoalList';
UPDATE ohrm_screen SET route_name = 'performance_viewEmployeePerformanceProfile' WHERE module_id = @module_performance AND action_url = 'viewEmployeePerformanceProfile';
UPDATE ohrm_screen SET route_name = 'performance_viewFullComparisonReport' WHERE module_id = @module_performance AND action_url = 'viewFullComparisonReport';
UPDATE ohrm_screen SET route_name = 'performance_viewPerformanceProgressReport' WHERE module_id = @module_performance AND action_url = 'viewPerformanceProgressReport';
UPDATE ohrm_screen SET route_name = 'performance_viewPerformanceReport' WHERE module_id = @module_performance AND action_url = 'viewPerformanceReport';
UPDATE ohrm_screen SET route_name = 'performancetracker_addPerformanceTracker' WHERE module_id = @module_performanceTracker AND action_url = 'addPerformanceTracker';
UPDATE ohrm_screen SET route_name = 'performancetracker_viewEmployeePerformanceTrackerList' WHERE module_id = @module_performanceTracker AND action_url = 'viewEmployeePerformanceTrackerList';
UPDATE ohrm_screen SET route_name = 'performancetracker_viewMyPerformanceTrackerList' WHERE module_id = @module_performanceTracker AND action_url = 'viewMyPerformanceTrackerList';
UPDATE ohrm_screen SET route_name = 'recruitment_addQuestionsToPool' WHERE module_id = @module_recruitment AND action_url = 'addQuestionsToPool';
UPDATE ohrm_screen SET route_name = 'recruitment_displayVacancySuccessionReportCriteria' WHERE module_id = @module_recruitment AND action_url = 'displayVacancySuccessionReportCriteria';
UPDATE ohrm_screen SET route_name = 'recruitment_viewCandidates' WHERE module_id = @module_recruitment AND action_url = 'viewCandidates';
UPDATE ohrm_screen SET route_name = 'recruitment_viewJobVacancy' WHERE module_id = @module_recruitment AND action_url = 'viewJobVacancy';
UPDATE ohrm_screen SET route_name = 'recruitment_viewRecruitmentModule' WHERE module_id = @module_recruitment AND action_url = 'viewRecruitmentModule';
UPDATE ohrm_screen SET route_name = 'time_displayAttendanceDetailsReport' WHERE module_id = @module_time AND action_url = 'displayAttendanceDetailsReport';
UPDATE ohrm_screen SET route_name = 'time_displayAttendanceSummaryReportCriteria' WHERE module_id = @module_time AND action_url = 'displayAttendanceSummaryReportCriteria';
UPDATE ohrm_screen SET route_name = 'time_displayEmployeeReportCriteria' WHERE module_id = @module_time AND action_url = 'displayEmployeeReportCriteria';
UPDATE ohrm_screen SET route_name = 'time_displayMyAttendanceDetailsReport' WHERE module_id = @module_time AND action_url = 'displayMyAttendanceDetailsReport';
UPDATE ohrm_screen SET route_name = 'time_displayProjectReportCriteria' WHERE module_id = @module_time AND action_url = 'displayProjectReportCriteria';
UPDATE ohrm_screen SET route_name = 'time_viewCustomers' WHERE module_id = @module_time AND action_url = 'viewCustomers';
UPDATE ohrm_screen SET route_name = 'time_viewEmployeeTimesheet' WHERE module_id = @module_time AND action_url = 'viewEmployeeTimesheet';
UPDATE ohrm_screen SET route_name = 'time_viewMyTimesheet' WHERE module_id = @module_time AND action_url = 'viewMyTimesheet';
UPDATE ohrm_screen SET route_name = 'time_viewProjects' WHERE module_id = @module_time AND action_url = 'viewProjects';
UPDATE ohrm_screen SET route_name = 'time_viewTimeModule' WHERE module_id = @module_time AND action_url = 'viewTimeModule';
UPDATE ohrm_screen SET route_name = 'time_viewTimesheetCsvExtract' WHERE module_id = @module_time AND action_url = 'viewTimesheetCsvExtract';
UPDATE ohrm_screen SET route_name = 'training_defaultTrainingModulePage' WHERE module_id = @module_training AND action_url = 'defaultTrainingModulePage';
UPDATE ohrm_screen SET route_name = 'training_viewCourseList' WHERE module_id = @module_training AND action_url = 'viewCourseList';
UPDATE ohrm_screen SET route_name = 'training_viewMyTrainingSessionList' WHERE module_id = @module_training AND action_url = 'viewMyTrainingSessionList';
UPDATE ohrm_screen SET route_name = 'training_viewPackageList' WHERE module_id = @module_training AND action_url = 'viewPackageList';
UPDATE ohrm_screen SET route_name = 'training_viewSessionList' WHERE module_id = @module_training AND action_url = 'viewSessionList';
UPDATE ohrm_screen SET route_name = 'training_viewTrainerSessionList' WHERE module_id = @module_training AND action_url = 'viewTrainerSessionList';

