-- ============================================================= -- 补全 MCP 工具所用字段的数据库注释(幂等) -- 背景:MCP 工具(crm_org_user_search 等)会检索以下三张平台框架表 -- 的字段,但这些表此前缺乏字段注释。这里通过原生 -- COMMENT ON COLUMN IF EXISTS 幂等补充,不存在的列自动跳过。 -- 说明:crm_channel_expansion_coverage / cnarea 已各自有注释, -- 不在此重复;本脚本只补原缺失注释的字段。 -- ============================================================= begin; comment on column if exists sys_org.id is '组织主键'; comment on column if exists sys_org.org_name is '组织/部门名称'; comment on column if exists sys_org.is_deleted is '逻辑删除标记'; comment on column if exists sys_role.role_id is '角色主键'; comment on column if exists sys_role.role_name is '角色名称'; comment on column if exists sys_role.role_code is '角色编码'; comment on column if exists sys_role.status is '角色状态'; comment on column if exists sys_role.is_deleted is '逻辑删除标记'; comment on column if exists sys_user_role.user_id is '用户ID'; comment on column if exists sys_user_role.role_id is '角色ID'; comment on column if exists sys_user_role.is_deleted is '逻辑删除标记'; commit;