SPB Git

spb/cancerindex

Public
719 B · 16 lines sql
1CREATE TABLE "system_alerts" (2	"id" bigserial PRIMARY KEY NOT NULL,3	"kind" text NOT NULL,4	"severity" text DEFAULT 'warn' NOT NULL,5	"connector_id" text,6	"message" text NOT NULL,7	"detail" jsonb DEFAULT '{}'::jsonb NOT NULL,8	"first_seen_at" timestamp with time zone DEFAULT now() NOT NULL,9	"last_seen_at" timestamp with time zone DEFAULT now() NOT NULL,10	"count" integer DEFAULT 1 NOT NULL,11	"status" text DEFAULT 'open' NOT NULL,12	"resolved_at" timestamp with time zone13);14--> statement-breakpoint15CREATE INDEX "system_alerts_status_idx" ON "system_alerts" USING btree ("status","kind","connector_id");--> statement-breakpoint16CREATE INDEX "system_alerts_seen_idx" ON "system_alerts" USING btree ("last_seen_at");
Files · 602dc111f3dd7d7dec082e01832909f07dca7bd3
Menu

Theme