
CREATE TABLE "public"."autopilot_approval_policy" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "tanant_id" uuid NOT NULL, "policy_attributes" jsonb NOT NULL DEFAULT jsonb_build_object(), "created_at" timestamp NOT NULL DEFAULT now(), "updated_at" timestamp NOT NULL DEFAULT now(), "created_by" uuid NOT NULL, "updated_by" uuid NOT NULL, PRIMARY KEY ("tanant_id") , FOREIGN KEY ("tanant_id") REFERENCES "public"."tenant"("id") ON UPDATE restrict ON DELETE restrict, FOREIGN KEY ("created_by") REFERENCES "public"."users"("id") ON UPDATE restrict ON DELETE restrict, FOREIGN KEY ("updated_by") REFERENCES "public"."users"("id") ON UPDATE restrict ON DELETE restrict, UNIQUE ("id"), UNIQUE ("tanant_id"));COMMENT ON TABLE "public"."autopilot_approval_policy" IS E'policy for autopilot(runbook/autooptimize) approval';
CREATE EXTENSION IF NOT EXISTS pgcrypto;
