* 描述问题
我发现在查询用户数据有一个报错,column “aiEmployees” does not exist,是我版本升太快了吗。我应该如何修复这个错误?
* 运行环境
- NocoBase 版本:v1.9.0-alpha.11
- 数据库种类与版本: PostgreSQL 15
- 操作系统:Ubuntu
-浏览器及版本
- 部署方式:Docker
- Docker 镜像版本:nocobase/nocobase:latest
- NodeJS 版本:
如何重现
沿途一路基于CMS的v1.9.0-alpha.1升级上来,不知道为什么会产生这个报错
预期行为
我希望请求没有报错
截图
日志
{“level”:“info”,“message”:“request GET /api/uiSchemas:getJsonSchema/u2qomgpcobc”,“method”:“GET”,“path”:“/api/uiSchemas:getJsonSchema/u2qomgpcobc”,“req”:{“header”:{“x-role”:“admin”,“x-hostname”:“startup.tdcktz.com”,“x-timezone”:“+08:00”,“x-locale”:“zh-CN”,“x-authenticator”:“basic”}},“app”:“main”,“reqId”:“fabd8ffe-3337-413b-95b7-1f373547266a”,“timestamp”:“2025-08-22 17:31:12”}
{“level”:“info”,“message”:“response /api/uiSchemas:getJsonSchema/u2qomgpcobc”,“method”:“GET”,“path”:“/api/uiSchemas:getJsonSchema/u2qomgpcobc”,“res”:{“status”:200},“action”:{“actionName”:“getJsonSchema”,“resourceName”:“uiSchemas”,“params”:{“filterByTk”:“u2qomgpcobc”,“resourceName”:“uiSchemas”,“resourceIndex”:“u2qomgpcobc”,“actionName”:“getJsonSchema”,“values”:{}}},“userId”:26,“status”:200,“cost”:36,“app”:“main”,“reqId”:“fabd8ffe-3337-413b-95b7-1f373547266a”,“bodySize”:148,“timestamp”:“2025-08-22 17:31:12”}
{“level”:“info”,“message”:“request GET /api/uiSchemas:getJsonSchema/41ife5z3jrm”,“method”:“GET”,“path”:“/api/uiSchemas:getJsonSchema/41ife5z3jrm”,“req”:{“header”:{“x-role”:“admin”,“x-hostname”:“startup.tdcktz.com”,“x-timezone”:“+08:00”,“x-locale”:“zh-CN”,“x-authenticator”:“basic”}},“app”:“main”,“reqId”:“c7bd91f2-7fda-4f7c-bacf-8547266b775a”,“timestamp”:“2025-08-22 17:31:12”}
{“level”:“info”,“message”:“response /api/uiSchemas:getJsonSchema/41ife5z3jrm”,“method”:“GET”,“path”:“/api/uiSchemas:getJsonSchema/41ife5z3jrm”,“res”:{“status”:200},“action”:{“actionName”:“getJsonSchema”,“resourceName”:“uiSchemas”,“params”:{“filterByTk”:“41ife5z3jrm”,“resourceName”:“uiSchemas”,“resourceIndex”:“41ife5z3jrm”,“actionName”:“getJsonSchema”,“values”:{}}},“userId”:26,“status”:200,“cost”:36,“app”:“main”,“reqId”:“c7bd91f2-7fda-4f7c-bacf-8547266b775a”,“bodySize”:32155,“timestamp”:“2025-08-22 17:31:12”}
{“level”:“info”,“message”:“request GET /api/users:list?pageSize=20&appends=roles&filter=%7B%7D”,“method”:“GET”,“path”:“/api/users:list?pageSize=20&appends=roles&filter=%7B%7D”,“req”:{“header”:{“x-role”:“admin”,“x-hostname”:“startup.tdcktz.com”,“x-timezone”:“+08:00”,“x-locale”:“zh-CN”,“x-authenticator”:“basic”}},“app”:“main”,“reqId”:“b4a4b57f-66cd-4669-9d69-46de3005f547”,“timestamp”:“2025-08-22 17:31:13”}
{“level”:“error”,“message”:“column "aiEmployees" does not exist”,“meta”:{“err”:“Error\n at Query.run (/app/nocobase/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n at /app/nocobase/node_modules/sequelize/lib/sequelize.js:315:28\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async PostgresQueryInterface.select (/app/nocobase/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n at async users.findAll (/app/nocobase/node_modules/sequelize/lib/model.js:1140:21)\n at async loadRecursive (/app/nocobase/node_modules/@nocobase/database/lib/eager-loading/eager-loading-tree.js:218:23)\n at async _EagerLoadingTree.load (/app/nocobase/node_modules/@nocobase/database/lib/eager-loading/eager-loading-tree.js:479:5)\n at async _Repository.find (/app/nocobase/node_modules/@nocobase/database/lib/repository.js:358:7)\n at async _Repository.findAndCount (/app/nocobase/node_modules/@nocobase/database/lib/repository.js:386:29)\n at async listWithPagination (/app/nocobase/node_modules/@nocobase/actions/lib/actions/list.js:102:27)\n at async list (/app/nocobase/node_modules/@nocobase/actions/lib/actions/list.js:125:5)\n at async triggerWorkflowActionMiddleware (/app/nocobase/node_modules/@nocobase/plugin-workflow-action-trigger/dist/server/ActionTrigger.js:61:7)\n at async dataTemplate (/app/nocobase/node_modules/@nocobase/server/lib/middlewares/data-template.js:36:3)\n at async parseVariables (/app/nocobase/node_modules/@nocobase/server/lib/middlewares/parse-variables.js:88:3)\n at async app.acl.use.after (/app/nocobase/node_modules/@nocobase/plugin-acl/dist/server/server.js:543:9)\n at async middlewares.add.tag (/app/nocobase/node_modules/@nocobase/acl/lib/acl.js:452:9)\n at async /app/nocobase/node_modules/@nocobase/acl/lib/allow-manager.js:108:7\n at async ACLMiddleware (/app/nocobase/node_modules/@nocobase/acl/lib/acl.js:325:14)\n at async app.resourcer.use.group (/app/nocobase/node_modules/@nocobase/plugin-api-keys/dist/server/plugin.js:62:9)\n at async setCurrentRole (/app/nocobase/node_modules/@nocobase/plugin-acl/dist/server/middlewares/setCurrentRole.js:124:3)\n at async AuthManagerMiddleware (/app/nocobase/node_modules/@nocobase/auth/lib/auth-manager.js:125:7)\n at async validateFilterParams (/app/nocobase/node_modules/@nocobase/server/lib/middlewares/validate-filter-params.js:39:12)”},“module”:“users”,“submodule”:“list”,“method”:“error-handler”,“app”:“main”,“reqId”:“b4a4b57f-66cd-4669-9d69-46de3005f547”,“dataSourceKey”:“main”,“timestamp”:“2025-08-22 17:31:13”}
{“level”:“error”,“message”:“response /api/users:list?pageSize=20&appends=roles&filter=%7B%7D”,“method”:“GET”,“path”:“/api/users:list?pageSize=20&appends=roles&filter=%7B%7D”,“res”:[{“message”:“column "aiEmployees" does not exist”}],“action”:{“actionName”:“list”,“resourceName”:“users”,“params”:{“pageSize”:“20”,“appends”:[“roles”],“filter”:{},“resourceName”:“users”,“actionName”:“list”,“values”:{},“fields”:[“account_id”,“aiEmployees”,“appLang”,“createdAt”,“createdById”,“email”,“id”,“industry”,“nickname”,“password”,“passwordChangeTz”,“phone”,“resetToken”,“sort”,“status”,“systemSettings”,“updatedAt”,“updatedById”,“username”,“createdById”]}},“userId”:26,“status”:500,“cost”:140,“app”:“main”,“reqId”:“b4a4b57f-66cd-4669-9d69-46de3005f547”,“bodySize”:64,“timestamp”:“2025-08-22 17:31:13”}
