Skip to content

Commit 60ed812

Browse files
committed
reran migrations
1 parent 2945c53 commit 60ed812

4 files changed

Lines changed: 6599 additions & 223 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
CREATE TABLE "mcp_servers" (
2+
"id" text PRIMARY KEY NOT NULL,
3+
"workspace_id" text NOT NULL,
4+
"created_by" text,
5+
"name" text NOT NULL,
6+
"description" text,
7+
"transport" text NOT NULL,
8+
"url" text,
9+
"headers" json DEFAULT '{}',
10+
"timeout" integer DEFAULT 30000,
11+
"retries" integer DEFAULT 3,
12+
"enabled" boolean DEFAULT true NOT NULL,
13+
"last_connected" timestamp,
14+
"connection_status" text DEFAULT 'disconnected',
15+
"last_error" text,
16+
"tool_count" integer DEFAULT 0,
17+
"last_tools_refresh" timestamp,
18+
"total_requests" integer DEFAULT 0,
19+
"last_used" timestamp,
20+
"deleted_at" timestamp,
21+
"created_at" timestamp DEFAULT now() NOT NULL,
22+
"updated_at" timestamp DEFAULT now() NOT NULL
23+
);
24+
--> statement-breakpoint
25+
ALTER TABLE "mcp_servers" ADD CONSTRAINT "mcp_servers_workspace_id_workspace_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspace"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
26+
ALTER TABLE "mcp_servers" ADD CONSTRAINT "mcp_servers_created_by_user_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."user"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
27+
CREATE INDEX "mcp_servers_workspace_enabled_idx" ON "mcp_servers" USING btree ("workspace_id","enabled");--> statement-breakpoint
28+
CREATE INDEX "mcp_servers_workspace_deleted_idx" ON "mcp_servers" USING btree ("workspace_id","deleted_at");

apps/sim/db/migrations/meta/0086_snapshot.json

Lines changed: 1 addition & 223 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,219 +2354,6 @@
23542354
"checkConstraints": {},
23552355
"isRLSEnabled": false
23562356
},
2357-
<<<<<<< HEAD
2358-
=======
2359-
"public.mcp_servers": {
2360-
"name": "mcp_servers",
2361-
"schema": "",
2362-
"columns": {
2363-
"id": {
2364-
"name": "id",
2365-
"type": "text",
2366-
"primaryKey": true,
2367-
"notNull": true
2368-
},
2369-
"workspace_id": {
2370-
"name": "workspace_id",
2371-
"type": "text",
2372-
"primaryKey": false,
2373-
"notNull": true
2374-
},
2375-
"created_by": {
2376-
"name": "created_by",
2377-
"type": "text",
2378-
"primaryKey": false,
2379-
"notNull": false
2380-
},
2381-
"name": {
2382-
"name": "name",
2383-
"type": "text",
2384-
"primaryKey": false,
2385-
"notNull": true
2386-
},
2387-
"description": {
2388-
"name": "description",
2389-
"type": "text",
2390-
"primaryKey": false,
2391-
"notNull": false
2392-
},
2393-
"transport": {
2394-
"name": "transport",
2395-
"type": "text",
2396-
"primaryKey": false,
2397-
"notNull": true
2398-
},
2399-
"url": {
2400-
"name": "url",
2401-
"type": "text",
2402-
"primaryKey": false,
2403-
"notNull": false
2404-
},
2405-
"headers": {
2406-
"name": "headers",
2407-
"type": "json",
2408-
"primaryKey": false,
2409-
"notNull": false,
2410-
"default": "'{}'"
2411-
},
2412-
"timeout": {
2413-
"name": "timeout",
2414-
"type": "integer",
2415-
"primaryKey": false,
2416-
"notNull": false,
2417-
"default": 30000
2418-
},
2419-
"retries": {
2420-
"name": "retries",
2421-
"type": "integer",
2422-
"primaryKey": false,
2423-
"notNull": false,
2424-
"default": 3
2425-
},
2426-
"enabled": {
2427-
"name": "enabled",
2428-
"type": "boolean",
2429-
"primaryKey": false,
2430-
"notNull": true,
2431-
"default": true
2432-
},
2433-
"last_connected": {
2434-
"name": "last_connected",
2435-
"type": "timestamp",
2436-
"primaryKey": false,
2437-
"notNull": false
2438-
},
2439-
"connection_status": {
2440-
"name": "connection_status",
2441-
"type": "text",
2442-
"primaryKey": false,
2443-
"notNull": false,
2444-
"default": "'disconnected'"
2445-
},
2446-
"last_error": {
2447-
"name": "last_error",
2448-
"type": "text",
2449-
"primaryKey": false,
2450-
"notNull": false
2451-
},
2452-
"tool_count": {
2453-
"name": "tool_count",
2454-
"type": "integer",
2455-
"primaryKey": false,
2456-
"notNull": false,
2457-
"default": 0
2458-
},
2459-
"last_tools_refresh": {
2460-
"name": "last_tools_refresh",
2461-
"type": "timestamp",
2462-
"primaryKey": false,
2463-
"notNull": false
2464-
},
2465-
"total_requests": {
2466-
"name": "total_requests",
2467-
"type": "integer",
2468-
"primaryKey": false,
2469-
"notNull": false,
2470-
"default": 0
2471-
},
2472-
"last_used": {
2473-
"name": "last_used",
2474-
"type": "timestamp",
2475-
"primaryKey": false,
2476-
"notNull": false
2477-
},
2478-
"deleted_at": {
2479-
"name": "deleted_at",
2480-
"type": "timestamp",
2481-
"primaryKey": false,
2482-
"notNull": false
2483-
},
2484-
"created_at": {
2485-
"name": "created_at",
2486-
"type": "timestamp",
2487-
"primaryKey": false,
2488-
"notNull": true,
2489-
"default": "now()"
2490-
},
2491-
"updated_at": {
2492-
"name": "updated_at",
2493-
"type": "timestamp",
2494-
"primaryKey": false,
2495-
"notNull": true,
2496-
"default": "now()"
2497-
}
2498-
},
2499-
"indexes": {
2500-
"mcp_servers_workspace_enabled_idx": {
2501-
"name": "mcp_servers_workspace_enabled_idx",
2502-
"columns": [
2503-
{
2504-
"expression": "workspace_id",
2505-
"isExpression": false,
2506-
"asc": true,
2507-
"nulls": "last"
2508-
},
2509-
{
2510-
"expression": "enabled",
2511-
"isExpression": false,
2512-
"asc": true,
2513-
"nulls": "last"
2514-
}
2515-
],
2516-
"isUnique": false,
2517-
"concurrently": false,
2518-
"method": "btree",
2519-
"with": {}
2520-
},
2521-
"mcp_servers_workspace_deleted_idx": {
2522-
"name": "mcp_servers_workspace_deleted_idx",
2523-
"columns": [
2524-
{
2525-
"expression": "workspace_id",
2526-
"isExpression": false,
2527-
"asc": true,
2528-
"nulls": "last"
2529-
},
2530-
{
2531-
"expression": "deleted_at",
2532-
"isExpression": false,
2533-
"asc": true,
2534-
"nulls": "last"
2535-
}
2536-
],
2537-
"isUnique": false,
2538-
"concurrently": false,
2539-
"method": "btree",
2540-
"with": {}
2541-
}
2542-
},
2543-
"foreignKeys": {
2544-
"mcp_servers_workspace_id_workspace_id_fk": {
2545-
"name": "mcp_servers_workspace_id_workspace_id_fk",
2546-
"tableFrom": "mcp_servers",
2547-
"tableTo": "workspace",
2548-
"columnsFrom": ["workspace_id"],
2549-
"columnsTo": ["id"],
2550-
"onDelete": "cascade",
2551-
"onUpdate": "no action"
2552-
},
2553-
"mcp_servers_created_by_user_id_fk": {
2554-
"name": "mcp_servers_created_by_user_id_fk",
2555-
"tableFrom": "mcp_servers",
2556-
"tableTo": "user",
2557-
"columnsFrom": ["created_by"],
2558-
"columnsTo": ["id"],
2559-
"onDelete": "set null",
2560-
"onUpdate": "no action"
2561-
}
2562-
},
2563-
"compositePrimaryKeys": {},
2564-
"uniqueConstraints": {},
2565-
"policies": {},
2566-
"checkConstraints": {},
2567-
"isRLSEnabled": false
2568-
},
2569-
>>>>>>> 5fefdc305 (reran migrations)
25702357
"public.member": {
25712358
"name": "member",
25722359
"schema": "",
@@ -3977,16 +3764,13 @@
39773764
"notNull": true,
39783765
"default": 0
39793766
},
3980-
<<<<<<< HEAD
39813767
"api_endpoint_requests": {
39823768
"name": "api_endpoint_requests",
39833769
"type": "integer",
39843770
"primaryKey": false,
39853771
"notNull": true,
39863772
"default": 0
39873773
},
3988-
=======
3989-
>>>>>>> 5fefdc305 (reran migrations)
39903774
"window_start": {
39913775
"name": "window_start",
39923776
"type": "timestamp",
@@ -5741,7 +5525,6 @@
57415525
"checkConstraints": {},
57425526
"isRLSEnabled": false
57435527
},
5744-
<<<<<<< HEAD
57455528
"public.workflow_log_webhook": {
57465529
"name": "workflow_log_webhook",
57475530
"schema": "",
@@ -6059,8 +5842,6 @@
60595842
"checkConstraints": {},
60605843
"isRLSEnabled": false
60615844
},
6062-
=======
6063-
>>>>>>> 5fefdc305 (reran migrations)
60645845
"public.workflow_schedule": {
60655846
"name": "workflow_schedule",
60665847
"schema": "",
@@ -6548,14 +6329,11 @@
65486329
"schema": "public",
65496330
"values": ["admin", "write", "read"]
65506331
},
6551-
<<<<<<< HEAD
65526332
"public.webhook_delivery_status": {
65536333
"name": "webhook_delivery_status",
65546334
"schema": "public",
65556335
"values": ["pending", "in_progress", "success", "failed"]
65566336
},
6557-
=======
6558-
>>>>>>> 5fefdc305 (reran migrations)
65596337
"public.workspace_invitation_status": {
65606338
"name": "workspace_invitation_status",
65616339
"schema": "public",
@@ -6572,4 +6350,4 @@
65726350
"schemas": {},
65736351
"tables": {}
65746352
}
6575-
}
6353+
}

0 commit comments

Comments
 (0)