・プッシュ通知の修正

・メニューをスマホに最適化
・アラート送信済みの条件が再度発動しないように修正
This commit is contained in:
CyberRex
2026-05-25 16:29:38 +09:00
parent 50b872b439
commit a0356e630e
10 changed files with 844 additions and 88 deletions

View File

@@ -106,11 +106,19 @@ CREATE TABLE IF NOT EXISTS site_alert_conditions (
threshold_hours integer NOT NULL CHECK (threshold_hours > 0 AND threshold_hours <= 17520),
webhook_method_ids uuid[] NOT NULL DEFAULT '{}',
push_enabled boolean NOT NULL DEFAULT false,
last_notified_certificate_expires_at timestamptz,
last_notified_at timestamptz,
last_notification_skipped_at timestamptz,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now(),
UNIQUE (site_id, condition_type, threshold_hours)
);
ALTER TABLE site_alert_conditions
ADD COLUMN IF NOT EXISTS last_notified_certificate_expires_at timestamptz,
ADD COLUMN IF NOT EXISTS last_notified_at timestamptz,
ADD COLUMN IF NOT EXISTS last_notification_skipped_at timestamptz;
CREATE INDEX IF NOT EXISTS site_alert_conditions_site_id_idx ON site_alert_conditions(site_id);
DROP TRIGGER IF EXISTS site_alert_conditions_set_updated_at ON site_alert_conditions;