Skip to content

Commit 0de4158

Browse files
waleedlatif1claude
andcommitted
chore(db): regenerate MCP OAuth migration as 0205 post-rebase
Replaces the old 0202_unknown_newton_destine migration which collided with staging's 0202/0203/0204. Bumps API validation route baseline to 735 to account for the two new MCP OAuth endpoints. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent b20f643 commit 0de4158

4 files changed

Lines changed: 15975 additions & 2 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
CREATE TABLE "mcp_server_oauth" (
2+
"id" text PRIMARY KEY NOT NULL,
3+
"mcp_server_id" text NOT NULL,
4+
"user_id" text NOT NULL,
5+
"workspace_id" text NOT NULL,
6+
"client_information" text,
7+
"tokens" text,
8+
"code_verifier" text,
9+
"state" text,
10+
"last_refreshed_at" timestamp,
11+
"created_at" timestamp DEFAULT now() NOT NULL,
12+
"updated_at" timestamp DEFAULT now() NOT NULL
13+
);
14+
--> statement-breakpoint
15+
ALTER TABLE "mcp_servers" ADD COLUMN "auth_type" text DEFAULT 'headers' NOT NULL;--> statement-breakpoint
16+
ALTER TABLE "mcp_servers" ADD COLUMN "oauth_client_id" text;--> statement-breakpoint
17+
ALTER TABLE "mcp_servers" ADD COLUMN "oauth_client_secret" text;--> statement-breakpoint
18+
ALTER TABLE "mcp_server_oauth" ADD CONSTRAINT "mcp_server_oauth_mcp_server_id_mcp_servers_id_fk" FOREIGN KEY ("mcp_server_id") REFERENCES "public"."mcp_servers"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
19+
ALTER TABLE "mcp_server_oauth" ADD CONSTRAINT "mcp_server_oauth_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
20+
ALTER TABLE "mcp_server_oauth" ADD CONSTRAINT "mcp_server_oauth_workspace_id_workspace_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspace"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
21+
CREATE UNIQUE INDEX "mcp_server_oauth_server_user_unique" ON "mcp_server_oauth" USING btree ("mcp_server_id","user_id");--> statement-breakpoint
22+
CREATE INDEX "mcp_server_oauth_state_idx" ON "mcp_server_oauth" USING btree ("state");

0 commit comments

Comments
 (0)