Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Zhang (张涛) committed May 7, 2024
1 parent 38bf4f4 commit 4b7ae2b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
Warnings:
- You are about to drop the column `cov_origin` on the `coverage` table. All the data in the column will be lost.
- Added the required column `rule` to the `coverage` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "coverage" DROP COLUMN "cov_origin",
ADD COLUMN "rule" TEXT NOT NULL;
2 changes: 1 addition & 1 deletion packages/canyon-backend/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ model Coverage {
reporter String
reportID String @map("report_id") // 未来聚合的一句,区分case
covType String @map("cov_type") // 普通类型,默认normal
covOrigin String @map("cov_origin") // 来源,比如ci
rule String // 规则
relationID Json @map("relation_id") // 关联ID,八位,{'0':'xxx','1':'xxx}
summary Json
tag Json // 存点额外的信息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class ConsumerCoverageService {
const newAgg = await this.prisma.coverage.create({
data: {
covType: covType,
covOrigin: 'handmade',
rule: 'auto',
relationID: '',
summary: getSummaryByPath(
'~',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class CoverageClientService {
reporter: currentUser,
reportID: coverageReport.reportID,
covType: 'normal',
covOrigin: 'handmade', //没有就是手工
rule: 'auto', //没有就是手工
summary: {},
tag: coverageReport.tags || {},
relationID: '',
Expand All @@ -111,7 +111,7 @@ export class CoverageClientService {
projectID: cov.projectID,
reportID: cov.reportID,
covType: 'normal',
covOrigin: cov.covOrigin,
rule: cov.rule,
tag: JSON.stringify(cov.tag),
createdAt: new Date(),
});
Expand Down

0 comments on commit 4b7ae2b

Please sign in to comment.