mirror of
https://github.com/anand34577/ferrum.git
synced 2026-09-19 09:05:56 +00:00
fadc1f24e3
- internal/digest: fleet summary builder + scheduler, delivered via the existing notify.Notifier (SMTP/Gotify), admin settings + send-now endpoint
- internal/export: Terraform (proxmox_vm_qemu/proxmox_lxc) and Ansible YAML inventory generators from live fleet inventory, downloadable via /connections/{id}/export/{terraform,ansible}
- Migration renumbered 00031 to avoid colliding with 00026-00030 already on this branch
18 lines
662 B
SQL
18 lines
662 B
SQL
-- +goose Up
|
|
-- Scheduled fleet health digest (email/webhook summary of uptime, backup
|
|
-- success rate, active alerts, capacity) — single-row settings, same
|
|
-- pattern as system_settings/notification_settings. last_sent_at drives the
|
|
-- scheduler's due-time check (internal/digest.Scheduler); it's NULL until
|
|
-- the first send.
|
|
CREATE TABLE digest_settings (
|
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
enabled INTEGER NOT NULL DEFAULT 0,
|
|
interval_hours INTEGER NOT NULL DEFAULT 168,
|
|
recipients TEXT NOT NULL DEFAULT '',
|
|
last_sent_at TEXT,
|
|
updated_at TEXT NOT NULL
|
|
);
|
|
|
|
-- +goose Down
|
|
DROP TABLE digest_settings;
|