跳转至

public.mcp_server

列

名称 类型 默认值 可空 子表 父表 注释
createdAt timestamp(3) with time zone CURRENT_TIMESTAMP(3) false
createdById uuid true public.user 创建者。用户被删除后为 NULL
deletedAt timestamp(3) with time zone true 软删除。未被删除的服务器为 NULL
description text ''::text false 客户端将其作为 MCP 指令获取
id uuid false public.mcp_server_block public.mcp_server_connection public.mcp_server_tool UUIDv7,由应用生成
name varchar(128) false
projectId varchar(36) false public.project
slug varchar(128) false 服务器 URL 的路径段。它永不改变。被删除的服务器会保留它,直到其项目被删除
updatedAt timestamp(3) with time zone CURRENT_TIMESTAMP(3) false

约束

名称 类型 定义
FK_6f64b29cefbc1d0aa5ae1ecc78c FOREIGN KEY FOREIGN KEY ("createdById") REFERENCES "user"(id) ON DELETE SET NULL
FK_dd85c7c51f3c8137aecb1cafd34 FOREIGN KEY FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE
PK_940f98ed91dd060f63e6fc5634e PRIMARY KEY PRIMARY KEY (id)
mcp_server_createdAt_not_null n NOT NULL "createdAt"
mcp_server_description_not_null n NOT NULL description
mcp_server_id_not_null n NOT NULL id
mcp_server_name_not_null n NOT NULL name
mcp_server_projectId_not_null n NOT NULL "projectId"
mcp_server_slug_not_null n NOT NULL slug
mcp_server_updatedAt_not_null n NOT NULL "updatedAt"

索引

名称 定义
IDX_6f64b29cefbc1d0aa5ae1ecc78 CREATE INDEX "IDX_6f64b29cefbc1d0aa5ae1ecc78" ON public.mcp_server USING btree ("createdById")
IDX_c70bcc8686212f76f1d03a9bba CREATE UNIQUE INDEX "IDX_c70bcc8686212f76f1d03a9bba" ON public.mcp_server USING btree (slug)
IDX_dd85c7c51f3c8137aecb1cafd3 CREATE INDEX "IDX_dd85c7c51f3c8137aecb1cafd3" ON public.mcp_server USING btree ("projectId")
PK_940f98ed91dd060f63e6fc5634e CREATE UNIQUE INDEX "PK_940f98ed91dd060f63e6fc5634e" ON public.mcp_server USING btree (id)

关系

erDiagram

"public.mcp_server" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
"public.mcp_server_block" }o--|| "public.mcp_server" : "FOREIGN KEY (#quot;serverId#quot;) REFERENCES mcp_server(id) ON DELETE CASCADE"
"public.mcp_server_connection" }o--|| "public.mcp_server" : "FOREIGN KEY (#quot;serverId#quot;) REFERENCES mcp_server(id) ON DELETE CASCADE"
"public.mcp_server_tool" }o--|| "public.mcp_server" : "FOREIGN KEY (#quot;serverId#quot;) REFERENCES mcp_server(id) ON DELETE CASCADE"
"public.mcp_server" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"

"public.mcp_server" {
  timestamp_3__with_time_zone createdAt
  uuid createdById FK
  timestamp_3__with_time_zone deletedAt
  text description
  uuid id
  varchar_128_ name
  varchar_36_ projectId FK
  varchar_128_ slug
  timestamp_3__with_time_zone updatedAt
}
"public.user" {
  timestamp_3__with_time_zone createdAt
  boolean disabled
  varchar_255_ email
  varchar_32_ firstName
  uuid id
  varchar_16_ kind
  date lastActiveAt
  varchar_32_ lastName
  boolean mfaEnabled
  text mfaRecoveryCodes
  text mfaSecret
  varchar_255_ password
  json personalizationAnswers
  varchar_128_ roleSlug FK
  json settings
  timestamp_3__with_time_zone updatedAt
}
"public.mcp_server_block" {
  timestamp_3__with_time_zone blockedAt
  uuid blockedById FK
  uuid serverId FK
  uuid userId FK
}
"public.mcp_server_connection" {
  varchar_255_ clientName
  timestamp_3__with_time_zone firstUsedAt
  timestamp_3__with_time_zone lastUsedAt
  varchar oauthClientId FK
  uuid serverId FK
  uuid userId FK
}
"public.mcp_server_tool" {
  timestamp_3__with_time_zone createdAt
  text description
  varchar_16_ draftSource
  uuid id
  varchar_16_ kind
  integer position
  uuid serverId FK
  varchar_36_ targetId
  json toolData
  varchar_64_ toolName
  timestamp_3__with_time_zone updatedAt
}
"public.project" {
  timestamp_3__with_time_zone createdAt
  uuid creatorId FK
  json customTelemetryTags
  varchar_512_ description
  json icon
  varchar_36_ id
  varchar_255_ name
  varchar_36_ type
  timestamp_3__with_time_zone updatedAt
}

由 tbls 生成

本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 n8/n8n