Skip to content

Commit 3a04fd6

Browse files
committed
migration updated
1 parent 353170a commit 3a04fd6

File tree

6 files changed

+78
-187
lines changed

6 files changed

+78
-187
lines changed

prisma/migrations/20200713222147-branch-strategy/README.md

Lines changed: 0 additions & 180 deletions
This file was deleted.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Migration `20200715232608-branch-strategy`
2+
3+
This migration has been generated by Pavel Strunkin at 7/15/2020, 11:26:08 PM.
4+
You can check out the [state of the schema](./schema.prisma) after the migration.
5+
6+
## Database Steps
7+
8+
```sql
9+
CREATE UNIQUE INDEX "TestVariation.name_browser_device_os_viewport_branchName" ON "public"."TestVariation"("name","browser","device","os","viewport","branchName")
10+
```
11+
12+
## Changes
13+
14+
```diff
15+
diff --git schema.prisma schema.prisma
16+
migration 20200707182652-project-name-unique-constraint..20200715232608-branch-strategy
17+
--- datamodel.dml
18+
+++ datamodel.dml
19+
@@ -3,9 +3,9 @@
20+
}
21+
datasource db {
22+
provider = "postgresql"
23+
- url = "***"
24+
+ url = "***"
25+
}
26+
model Build {
27+
id String @default(uuid()) @id
28+
@@ -23,8 +23,9 @@
29+
model Project {
30+
id String @default(uuid()) @id
31+
name String
32+
+ mainBranchName String @default("master")
33+
builds Build[]
34+
testVariations TestVariation[]
35+
updatedAt DateTime @updatedAt
36+
createdAt DateTime @default(now())
37+
@@ -43,8 +44,9 @@
38+
buildId String
39+
build Build @relation(fields: [buildId], references: [id])
40+
testVariationId String
41+
testVariation TestVariation @relation(fields: [testVariationId], references: [id])
42+
+ merge Boolean @default(false)
43+
updatedAt DateTime @updatedAt
44+
createdAt DateTime @default(now())
45+
// Test variation data
46+
name String @default("")
47+
@@ -55,13 +57,16 @@
48+
baselineName String?
49+
ignoreAreas String @default("[]")
50+
comment String?
51+
baseline Baseline?
52+
+ branchName String @default("master")
53+
+ baselineBranchName String?
54+
}
55+
model TestVariation {
56+
id String @default(uuid()) @id
57+
name String
58+
+ branchName String @default("master")
59+
browser String?
60+
device String?
61+
os String?
62+
viewport String?
63+
@@ -73,8 +78,10 @@
64+
baselines Baseline[]
65+
comment String?
66+
updatedAt DateTime @updatedAt
67+
createdAt DateTime @default(now())
68+
+
69+
+ @@unique([name, browser, device, os, viewport, branchName])
70+
}
71+
model Baseline {
72+
id String @default(uuid()) @id
73+
```
74+
75+

prisma/migrations/20200713222147-branch-strategy/schema.prisma renamed to prisma/migrations/20200715232608-branch-strategy/schema.prisma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ model TestVariation {
8080
updatedAt DateTime @updatedAt
8181
createdAt DateTime @default(now())
8282
83-
@@unique([name, browser, device, os, viewport, branchName], name: "unique variation")
83+
@@unique([name, browser, device, os, viewport, branchName])
8484
}
8585

8686
model Baseline {

prisma/migrations/20200713222147-branch-strategy/steps.json renamed to prisma/migrations/20200715232608-branch-strategy/steps.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,6 @@
146146
{
147147
"name": "",
148148
"value": "[name, browser, device, os, viewport, branchName]"
149-
},
150-
{
151-
"name": "name",
152-
"value": "\"unique variation\""
153149
}
154150
]
155151
},

prisma/migrations/migrate.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
20200526195312-approved-test-status-added
66
20200627134248-comment-added
77
20200707182652-project-name-unique-constraint
8-
20200713222147-branch-strategy
8+
20200715232608-branch-strategy

prisma/schema.prisma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ model TestVariation {
8080
updatedAt DateTime @updatedAt
8181
createdAt DateTime @default(now())
8282
83-
@@unique([name, browser, device, os, viewport, branchName], name: "unique variation")
83+
@@unique([name, browser, device, os, viewport, branchName])
8484
}
8585

8686
model Baseline {

0 commit comments

Comments
 (0)