INSERT IGNORE INTO permissions (name, display_name, description) VALUES
('patients.delete','Delete Patients','Archive patient records from the active directory.'),
('therapists.delete','Delete Therapists','Archive therapist profiles from the active directory.');

INSERT IGNORE INTO role_permissions (role_id, permission_id)
SELECT r.id, p.id FROM roles r CROSS JOIN permissions p
WHERE r.name IN ('SUPER_ADMIN','ADMIN') AND p.name IN ('patients.delete','therapists.delete');
