INSERT INTO permissions (name, display_name) VALUES
('services.view', 'View services and prices'),
('services.manage', 'Manage services and prices')
ON DUPLICATE KEY UPDATE display_name = VALUES(display_name);

INSERT IGNORE INTO role_permissions (role_id, permission_id)
SELECT r.id, p.id FROM roles r JOIN permissions p
WHERE r.name = 'ADMIN' AND p.name IN ('services.view','services.manage');
