canyon-project / canyon

👋 Canyon is a JavaScript code coverage solution
https://docs.canyoncov.com/getting-started/first-coverage
MIT License
131 stars 8 forks source link

新建项目->创建失败,报错提示Project数据表缺少字段instrument_cwd #20

Open imath60 opened 1 week ago

imath60 commented 1 week ago

1、复现步骤:点击创建,页面报错提示如下: image

2、接口返回如下:

{ "errors": [ { "message": "\nInvalidthis.prisma.project.create()invocation in\n/Users/liuyuan9/workspace/github/canyon/packages/canyon-backend/dist/project/services/project.service.js:52:36\n\n 49 }\n 50 async createProject(user, projectID, language) {\n 51 const { path_with_namespace, description, name, bu } = await (0, gitlab_adapter_1.getProjectByID)(projectID.split('-')[1], 'accessToken');\n→ 52 return this.prisma.project.create(\nThe columninstrument_cwddoes not exist in the current database.", "locations": [ { "line": 2, "column": 3 } ], "path": [ "createProject" ], "extensions": { "code": "INTERNAL_SERVER_ERROR", "stacktrace": [ "PrismaClientKnownRequestError: ", "Invalidthis.prisma.project.create()invocation in", "/Users/liuyuan9/workspace/github/canyon/packages/canyon-backend/dist/project/services/project.service.js:52:36", "", " 49 }", " 50 async createProject(user, projectID, language) {", " 51 const { path_with_namespace, description, name, bu } = await (0, gitlab_adapter_1.getProjectByID)(projectID.split('-')[1], 'accessToken');", "→ 52 return this.prisma.project.create(", "The columninstrument_cwddoes not exist in the current database.", " at si.handleRequestError (/Users/liuyuan9/workspace/github/canyon/node_modules/.pnpm/@prisma+client@5.8.1_prisma@5.8.1/node_modules/@prisma/client/runtime/library.js:125:6817)", " at si.handleAndLogRequestError (/Users/liuyuan9/workspace/github/canyon/node_modules/.pnpm/@prisma+client@5.8.1_prisma@5.8.1/node_modules/@prisma/client/runtime/library.js:125:6151)", " at si.request (/Users/liuyuan9/workspace/github/canyon/node_modules/.pnpm/@prisma+client@5.8.1_prisma@5.8.1/node_modules/@prisma/client/runtime/library.js:125:5859)", " at async l (/Users/liuyuan9/workspace/github/canyon/node_modules/.pnpm/@prisma+client@5.8.1_prisma@5.8.1/node_modules/@prisma/client/runtime/library.js:130:9805)", " at async target (/Users/liuyuan9/workspace/github/canyon/node_modules/.pnpm/@nestjs+core@10.3.9_@nestjs+common@10.3.9_@nestjs+platform-express@10.3.9_reflect-metadata@0.1.14_rxjs@7.8.1/node_modules/@nestjs/core/helpers/external-context-creator.js:74:28)", " at async Object.createProject (/Users/liuyuan9/workspace/github/canyon/node_modules/.pnpm/@nestjs+core@10.3.9_@nestjs+common@10.3.9_@nestjs+platform-express@10.3.9_reflect-metadata@0.1.14_rxjs@7.8.1/node_modules/@nestjs/core/helpers/external-proxy.js:9:24)" ] } } ], "data": null } 3、相关代码及数据库表 3.1、数据模型 image 3.2、数据表 image

zhangtao25 commented 1 week ago

目前更新比较快,可以直接使用 pnpm run migrate 来迁移数据库