-- Rename Checkout Report → Circulation Report (run once on existing DB)
UPDATE `app_modules`
SET `module_key` = 'circulation_report',
    `module_name` = 'Circulation Report',
    `route` = 'report/circulation_report'
WHERE `module_key` = 'checkout_report';

UPDATE `app_role_permissions` rp
LEFT JOIN `app_role_permissions` existing
  ON existing.`role_id` = rp.`role_id`
 AND existing.`module_key` = 'circulation_report'
SET rp.`module_key` = 'circulation_report'
WHERE rp.`module_key` = 'checkout_report'
  AND existing.`id` IS NULL;

DELETE FROM `app_role_permissions`
WHERE `module_key` = 'checkout_report';
