INSERT IGNORE INTO `roles` (`name`) VALUES
('Approver Level 1'),
('Approver Level 2'),
('Approver Level 3'),
('Approver Level 4'),
('Approver Level 5'),
('Approver Level 6'),
('Approver Level 7');

INSERT IGNORE INTO `permissions` (`name`) VALUES
('approve_level_1'),
('approve_level_2'),
('approve_level_3'),
('approve_level_4'),
('approve_level_5'),
('approve_level_6'),
('approve_level_7');

-- Assign approve_level_1 permission to Approver Level 1 role
INSERT IGNORE INTO `role_permissions` (`role_id`, `permission_id`)
SELECT (SELECT id FROM roles WHERE name = 'Approver Level 1'), (SELECT id FROM permissions WHERE name = 'approve_level_1');

-- Assign approve_level_2 permission to Approver Level 2 role
INSERT IGNORE INTO `role_permissions` (`role_id`, `permission_id`)
SELECT (SELECT id FROM roles WHERE name = 'Approver Level 2'), (SELECT id FROM permissions WHERE name = 'approve_level_2');

-- Assign approve_level_3 permission to Approver Level 3 role
INSERT IGNORE INTO `role_permissions` (`role_id`, `permission_id`)
SELECT (SELECT id FROM roles WHERE name = 'Approver Level 3'), (SELECT id FROM permissions WHERE name = 'approve_level_3');

-- Assign approve_level_4 permission to Approver Level 4 role
INSERT IGNORE INTO `role_permissions` (`role_id`, `permission_id`)
SELECT (SELECT id FROM roles WHERE name = 'Approver Level 4'), (SELECT id FROM permissions WHERE name = 'approve_level_4');

-- Assign approve_level_5 permission to Approver Level 5 role
INSERT IGNORE INTO `role_permissions` (`role_id`, `permission_id`)
SELECT (SELECT id FROM roles WHERE name = 'Approver Level 5'), (SELECT id FROM permissions WHERE name = 'approve_level_5');

-- Assign approve_level_6 permission to Approver Level 6 role
INSERT IGNORE INTO `role_permissions` (`role_id`, `permission_id`)
SELECT (SELECT id FROM roles WHERE name = 'Approver Level 6'), (SELECT id FROM permissions WHERE name = 'approve_level_6');

-- Assign approve_level_7 permission to Approver Level 7 role
INSERT IGNORE INTO `role_permissions` (`role_id`, `permission_id`)
SELECT (SELECT id FROM roles WHERE name = 'Approver Level 7'), (SELECT id FROM permissions WHERE name = 'approve_level_7');
