
CREATE TABLE "public"."event_resolution" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "event_id" uuid NOT NULL, "type" text NOT NULL, "data" jsonb, "status" text NOT NULL, "type_reference_id" text NOT NULL, "resolver_type" text NOT NULL, "resolver_id" text NOT NULL, "created_at" timestamp NOT NULL DEFAULT now(), "updated_at" timestamp NOT NULL DEFAULT now(), "status_message" text, PRIMARY KEY ("id") , CONSTRAINT "resolver_type_check" CHECK (resolver_type = ANY (ARRAY['User'::text, 'AutoOptimize'::text, 'AutoRunbook'::text])), CONSTRAINT "status_check" CHECK (status = ANY (ARRAY['InProgress'::text, 'Failed'::text, 'Success'::text, 'Configuring'::text])), CONSTRAINT "type_check" CHECK (type = ANY (ARRAY['PullRequest'::text, 'Ticket'::text, 'DeploymentChange'::text])));
CREATE EXTENSION IF NOT EXISTS pgcrypto;
