logicsrc/apps/pwa/src/migrations-pg/011_rotation_policy.sql
sh1pt-actions-fleet[bot] 0f237cb6e0
feat(rotation): 90-day policy, due runs wait for owner approval (CLI 0.16.0) (#270)
Every automatic secret older than the team's max age (90 days default) is
queued as one run in awaiting-approval. An owner/admin approves it on the
Rotation page or with `teams rotation-approve`; machine keys can queue but
never approve. logicsrc-rotate --queue (*/5 cron) runs approved runs with
propagate + health checks + rollback. rotation_auto_approve per team is the
paid automatic rotation add-on (off by default).

Co-authored-by: Anthony Ettinger <anthony@profullstack.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 04:36:26 +00:00

7 lines
596 B
SQL

-- Postgres copy of migrations/011_rotation_policy.sql (INTEGER -> bigint). Additive only.
-- 90-day rotation policy: due automatic secrets are queued as one run awaiting
-- owner/admin approval; rotation_auto_approve (paid add-on) skips the click.
ALTER TABLE credshare_teams ADD COLUMN IF NOT EXISTS rotation_max_age_days integer;
ALTER TABLE credshare_teams ADD COLUMN IF NOT EXISTS rotation_auto_approve integer NOT NULL DEFAULT 0;
ALTER TABLE credshare_rotation_runs ADD COLUMN IF NOT EXISTS approved_by text;
ALTER TABLE credshare_rotation_runs ADD COLUMN IF NOT EXISTS approved_at bigint;