CREATE TABLE IF NOT EXISTS `{{prefix}}release_hardening_audits` (
  `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
  `audit_status` VARCHAR(40) NOT NULL DEFAULT 'passed',
  `package_policy_status` VARCHAR(40) NOT NULL DEFAULT 'passed',
  `backup_status` VARCHAR(60) NOT NULL DEFAULT 'backup_recommended',
  `failed_items_json` LONGTEXT NULL,
  `summary_json` LONGTEXT NULL,
  `reviewed_by` BIGINT UNSIGNED NULL,
  `reviewed_at` DATETIME NULL,
  `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_release_hardening_status` (`audit_status`,`package_policy_status`,`created_at`),
  KEY `idx_release_hardening_reviewed` (`reviewed_by`,`reviewed_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
