mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-07 21:51:30 +00:00
1d1b89c9b5
- Add alert_thresholds_days JSONB column to renewal_policies (default [30,14,7,0]) - Add RenewalPolicy.AlertThresholdsDays field + EffectiveAlertThresholds() helper - Add RenewalPolicyRepository interface + postgres implementation - Rewrite CheckExpiringCertificates with per-policy threshold alerting - Add SendThresholdAlert + HasThresholdNotification for deduplication via [threshold:N] tags - Add Type and MessageLike filters to NotificationFilter + postgres query support - Auto-transition certs to Expiring (>0 days) or Expired (<=0 days) status - Record expiration_alert_sent audit events per threshold crossing - Fix .gitignore: allow SQL migration files, scope server/agent build artifact rules - Track previously untracked cmd/ and migrations/ directories - Update docs (README, architecture, demo-advanced) for threshold alerting Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
620 B
SQL
19 lines
620 B
SQL
-- Rollback initial schema - drop tables in reverse dependency order
|
|
|
|
DROP TABLE IF EXISTS notification_events;
|
|
DROP TABLE IF EXISTS audit_events;
|
|
DROP TABLE IF EXISTS policy_violations;
|
|
DROP TABLE IF EXISTS policy_rules;
|
|
DROP TABLE IF EXISTS jobs;
|
|
DROP TABLE IF EXISTS certificate_versions;
|
|
DROP TABLE IF EXISTS certificate_target_mappings;
|
|
DROP TABLE IF EXISTS deployment_targets;
|
|
DROP TABLE IF EXISTS managed_certificates;
|
|
DROP TABLE IF EXISTS agents;
|
|
DROP TABLE IF EXISTS issuers;
|
|
DROP TABLE IF EXISTS renewal_policies;
|
|
DROP TABLE IF EXISTS owners;
|
|
DROP TABLE IF EXISTS teams;
|
|
|
|
DROP EXTENSION IF EXISTS "uuid-ossp";
|