INSERT IGNORE INTO permissions (name, display_name, description) VALUES
('patients.assign', 'Assign patients', 'Assign and end patient therapist assignments.');

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='patients.assign';
