-- API audit redaction hardening:
-- 1) Store full SHA-256 hashes (64 chars) for IP and user-agent fields.
-- 2) Remove historical API audit rows that may contain plaintext query values or identifiers.

ALTER TABLE `api_audit_log`
  MODIFY COLUMN `ip` CHAR(64) NULL,
  MODIFY COLUMN `user_agent` CHAR(64) NULL;

DELETE FROM `api_audit_log`;
