/*--Please check the sps_menu table and check the order column--*/

INSERT INTO `sps_menu`
        (`id`, `menu_item`, `menu_url`, `menu_class`, `parent_menu_id`, `action`, `order`, `status`, `location_id`, `area_id`, `created_by`, `created_at`, `updated_at`, `deleted_at`, `updated_by`)
        VALUES (NULL, 'dwell_time_report', 'admin/dwell_time_report', 'menu', '46', '', '11.31', '1', '1', '1', '1', CURRENT_TIMESTAMP, '0000-00-00 00:00:00.000000', NULL, '');

/*--sps_menu_mapping---- please check the menu_id column of sps_menu_mapping and id column of sps_menu. It should be the same.*/

INSERT INTO `sps_menu_action_mapping`
        (`id`, `menu_id`, `action_id`, `area_id`, `location_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`)
        VALUES (NULL, (SELECT id FROM sps_menu WHERE sps_menu.menu_item = "dwell_time_report"), '1', '0', '0', '0', '0', CURRENT_TIMESTAMP, '0000-00-00 00:00:00.000000', NULL);

INSERT INTO `sps_menu_action_mapping`
        (`id`, `menu_id`, `action_id`, `area_id`, `location_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`)
        VALUES (NULL, (SELECT id FROM sps_menu WHERE sps_menu.menu_item = "dwell_time_report"), '6', '0', '0', '0', '0', CURRENT_TIMESTAMP, '0000-00-00 00:00:00.000000', NULL);

/*sps_access_rights table query*/

INSERT INTO `sps_access_rights`
	(`id`, `role_id`, `menu_id`, `action_id`, `created_by`, `updated_at`, `deleted_at`, `location_id`, `area_id`, `updated_by`, `created_at`)
	VALUES ('0', '1', (SELECT id FROM sps_menu WHERE sps_menu.menu_item = "dwell_time_report"), '1', '0', CURRENT_TIMESTAMP, NULL, '0', '0', '0', CURRENT_TIMESTAMP);

INSERT INTO `sps_access_rights`
	(`id`, `role_id`, `menu_id`, `action_id`, `created_by`, `updated_at`, `deleted_at`, `location_id`, `area_id`, `updated_by`, `created_at`)
	VALUES ('0', '1', (SELECT id FROM sps_menu WHERE sps_menu.menu_item = "dwell_time_report"), '6', '0', CURRENT_TIMESTAMP, NULL, '0', '0', '0', CURRENT_TIMESTAMP);
