Skip to content

Commit 43eae18

Browse files
authored
Merge branch 'master' into dependabot/npm_and_yarn/jest-26.5.2
2 parents fb7fadb + d8e64a5 commit 43eae18

File tree

13 files changed

+342
-54
lines changed

13 files changed

+342
-54
lines changed

package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@nestjs/platform-socket.io": "^7.4.2",
3131
"@nestjs/swagger": "^4.5.12",
3232
"@nestjs/websockets": "^7.4.2",
33-
"@prisma/client": "^2.4.1",
33+
"@prisma/client": "^2.8.1",
3434
"bcryptjs": "^2.4.3",
3535
"class-transformer": "^0.3.1",
3636
"class-validator": "^0.12.2",
@@ -52,7 +52,7 @@
5252
"@nestjs/cli": "^7.4.1",
5353
"@nestjs/schematics": "^7.0.1",
5454
"@nestjs/testing": "^7.4.2",
55-
"@prisma/cli": "^2.4.1",
55+
"@prisma/cli": "^2.8.1",
5656
"@types/bcryptjs": "^2.4.2",
5757
"@types/express": "^4.17.7",
5858
"@types/jest": "26.0.5",
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Migration `20201007145002-builds-counter`
2+
3+
This migration has been generated by Pavel Strunkin at 10/7/2020, 5:50:02 PM.
4+
You can check out the [state of the schema](./schema.prisma) after the migration.
5+
6+
## Database Steps
7+
8+
```sql
9+
ALTER TABLE "public"."Project" ADD COLUMN "buildsCounter" integer NOT NULL DEFAULT 0
10+
```
11+
12+
## Changes
13+
14+
```diff
15+
diff --git schema.prisma schema.prisma
16+
migration 20200909223305-test-variation-project-id-added-into-unique-constraint..20201007145002-builds-counter
17+
--- datamodel.dml
18+
+++ datamodel.dml
19+
@@ -1,15 +1,16 @@
20+
generator client {
21+
provider = "prisma-client-js"
22+
+ previewFeatures = ["atomicNumberOperations"]
23+
}
24+
datasource db {
25+
- provider = "postgresql"
26+
- url = "***"
27+
+ provider = "postgresql"
28+
+ url = "***"
29+
}
30+
model Build {
31+
- id String @default(uuid()) @id
32+
+ id String @id @default(uuid())
33+
number Int?
34+
branchName String?
35+
status String?
36+
testRuns TestRun[]
37+
@@ -22,21 +23,22 @@
38+
isRunning Boolean?
39+
}
40+
model Project {
41+
- id String @default(uuid()) @id
42+
+ id String @id @default(uuid())
43+
name String
44+
mainBranchName String @default("master")
45+
builds Build[]
46+
+ buildsCounter Int @default(0)
47+
testVariations TestVariation[]
48+
updatedAt DateTime @updatedAt
49+
createdAt DateTime @default(now())
50+
@@unique([name])
51+
}
52+
model TestRun {
53+
- id String @default(uuid()) @id
54+
+ id String @id @default(uuid())
55+
imageName String
56+
diffName String?
57+
diffPercent Float?
58+
diffTollerancePercent Float @default(0)
59+
@@ -63,9 +65,9 @@
60+
baselineBranchName String?
61+
}
62+
model TestVariation {
63+
- id String @default(uuid()) @id
64+
+ id String @id @default(uuid())
65+
name String
66+
branchName String @default("master")
67+
browser String?
68+
device String?
69+
@@ -84,9 +86,9 @@
70+
@@unique([projectId, name, browser, device, os, viewport, branchName])
71+
}
72+
model Baseline {
73+
- id String @default(uuid()) @id
74+
+ id String @id @default(uuid())
75+
baselineName String
76+
testVariationId String
77+
testVariation TestVariation @relation(fields: [testVariationId], references: [id])
78+
testRunId String?
79+
@@ -95,9 +97,9 @@
80+
createdAt DateTime @default(now())
81+
}
82+
model User {
83+
- id String @default(uuid()) @id
84+
+ id String @id @default(uuid())
85+
email String @unique
86+
password String
87+
firstName String?
88+
lastName String?
89+
```
90+
91+
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
generator client {
2+
provider = "prisma-client-js"
3+
previewFeatures = ["atomicNumberOperations"]
4+
}
5+
6+
datasource db {
7+
provider = "postgresql"
8+
url = "***"
9+
}
10+
11+
model Build {
12+
id String @id @default(uuid())
13+
number Int?
14+
branchName String?
15+
status String?
16+
testRuns TestRun[]
17+
projectId String
18+
project Project @relation(fields: [projectId], references: [id])
19+
updatedAt DateTime @updatedAt
20+
createdAt DateTime @default(now())
21+
user User? @relation(fields: [userId], references: [id])
22+
userId String?
23+
isRunning Boolean?
24+
}
25+
26+
model Project {
27+
id String @id @default(uuid())
28+
name String
29+
mainBranchName String @default("master")
30+
builds Build[]
31+
buildsCounter Int @default(0)
32+
testVariations TestVariation[]
33+
updatedAt DateTime @updatedAt
34+
createdAt DateTime @default(now())
35+
36+
@@unique([name])
37+
}
38+
39+
model TestRun {
40+
id String @id @default(uuid())
41+
imageName String
42+
diffName String?
43+
diffPercent Float?
44+
diffTollerancePercent Float @default(0)
45+
pixelMisMatchCount Int?
46+
status TestStatus
47+
buildId String
48+
build Build @relation(fields: [buildId], references: [id])
49+
testVariationId String
50+
testVariation TestVariation @relation(fields: [testVariationId], references: [id])
51+
merge Boolean @default(false)
52+
updatedAt DateTime @updatedAt
53+
createdAt DateTime @default(now())
54+
// Test variation data
55+
name String @default("")
56+
browser String?
57+
device String?
58+
os String?
59+
viewport String?
60+
baselineName String?
61+
ignoreAreas String @default("[]")
62+
comment String?
63+
baseline Baseline?
64+
branchName String @default("master")
65+
baselineBranchName String?
66+
}
67+
68+
model TestVariation {
69+
id String @id @default(uuid())
70+
name String
71+
branchName String @default("master")
72+
browser String?
73+
device String?
74+
os String?
75+
viewport String?
76+
baselineName String?
77+
ignoreAreas String @default("[]")
78+
projectId String
79+
project Project @relation(fields: [projectId], references: [id])
80+
testRuns TestRun[]
81+
baselines Baseline[]
82+
comment String?
83+
updatedAt DateTime @updatedAt
84+
createdAt DateTime @default(now())
85+
86+
@@unique([projectId, name, browser, device, os, viewport, branchName])
87+
}
88+
89+
model Baseline {
90+
id String @id @default(uuid())
91+
baselineName String
92+
testVariationId String
93+
testVariation TestVariation @relation(fields: [testVariationId], references: [id])
94+
testRunId String?
95+
testRun TestRun? @relation(fields: [testRunId], references: [id])
96+
updatedAt DateTime @updatedAt
97+
createdAt DateTime @default(now())
98+
}
99+
100+
model User {
101+
id String @id @default(uuid())
102+
email String @unique
103+
password String
104+
firstName String?
105+
lastName String?
106+
apiKey String @unique
107+
isActive Boolean @default(true)
108+
builds Build[]
109+
updatedAt DateTime @updatedAt
110+
createdAt DateTime @default(now())
111+
}
112+
113+
enum TestStatus {
114+
failed
115+
new
116+
ok
117+
unresolved
118+
approved
119+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"version": "0.3.14-fixed",
3+
"steps": [
4+
{
5+
"tag": "CreateField",
6+
"model": "Project",
7+
"field": "buildsCounter",
8+
"type": "Int",
9+
"arity": "Required"
10+
},
11+
{
12+
"tag": "CreateDirective",
13+
"location": {
14+
"path": {
15+
"tag": "Field",
16+
"model": "Project",
17+
"field": "buildsCounter"
18+
},
19+
"directive": "default"
20+
}
21+
},
22+
{
23+
"tag": "CreateArgument",
24+
"location": {
25+
"tag": "Directive",
26+
"path": {
27+
"tag": "Field",
28+
"model": "Project",
29+
"field": "buildsCounter"
30+
},
31+
"directive": "default"
32+
},
33+
"argument": "",
34+
"value": "0"
35+
}
36+
]
37+
}

prisma/migrations/migrate.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
20200715232608-branch-strategy
99
20200728221159-zero-diff-tolerance
1010
20200812213545-build-run-status
11-
20200909223305-test-variation-project-id-added-into-unique-constraint
11+
20200909223305-test-variation-project-id-added-into-unique-constraint
12+
20201007145002-builds-counter

prisma/package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)