moving
Some checks failed
Installer Smoke / installer-smoke (push) Has been cancelled

This commit is contained in:
Oleg Maslov
2026-09-02 10:10:29 +02:00
commit 0c3e2ead3b
3841 changed files with 970576 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
CREATE TABLE "team_capability_overrides" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"team_id" uuid NOT NULL,
"capability_name" text NOT NULL,
"capability_type" text NOT NULL,
"decision" text NOT NULL,
"reason" text DEFAULT '' NOT NULL,
"decided_by" uuid NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"decided_at" timestamp with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE "team_capability_policies" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"team_id" uuid NOT NULL,
"role" text NOT NULL,
"allowed_sources" jsonb DEFAULT '[]'::jsonb NOT NULL,
"blocked_tools" jsonb DEFAULT '[]'::jsonb NOT NULL,
"approval_threshold" text DEFAULT 'none' NOT NULL,
"updated_by" uuid,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE "team_capability_requests" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"team_id" uuid NOT NULL,
"requested_by" uuid NOT NULL,
"capability_name" text NOT NULL,
"capability_type" text NOT NULL,
"justification" text NOT NULL,
"status" text DEFAULT 'pending' NOT NULL,
"decided_by" uuid,
"decision_reason" text,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"decided_at" timestamp with time zone
);
--> statement-breakpoint
ALTER TABLE "team_capability_overrides" ADD CONSTRAINT "team_capability_overrides_team_id_teams_id_fk" FOREIGN KEY ("team_id") REFERENCES "public"."teams"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "team_capability_overrides" ADD CONSTRAINT "team_capability_overrides_decided_by_users_id_fk" FOREIGN KEY ("decided_by") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "team_capability_policies" ADD CONSTRAINT "team_capability_policies_team_id_teams_id_fk" FOREIGN KEY ("team_id") REFERENCES "public"."teams"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "team_capability_policies" ADD CONSTRAINT "team_capability_policies_updated_by_users_id_fk" FOREIGN KEY ("updated_by") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "team_capability_requests" ADD CONSTRAINT "team_capability_requests_team_id_teams_id_fk" FOREIGN KEY ("team_id") REFERENCES "public"."teams"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "team_capability_requests" ADD CONSTRAINT "team_capability_requests_requested_by_users_id_fk" FOREIGN KEY ("requested_by") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "team_capability_requests" ADD CONSTRAINT "team_capability_requests_decided_by_users_id_fk" FOREIGN KEY ("decided_by") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;