Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@nestjs/platform-socket.io": "^7.1.3",
"@nestjs/swagger": "^4.5.1",
"@nestjs/websockets": "^7.1.3",
"@prisma/client": "^2.0.0-beta.6",
"@prisma/client": "^2.2.2",
"bcryptjs": "^2.4.3",
"class-transformer": "^0.2.3",
"class-validator": "^0.11.1",
Expand All @@ -52,7 +52,7 @@
"@nestjs/cli": "^7.0.0",
"@nestjs/schematics": "^7.0.0",
"@nestjs/testing": "^7.0.0",
"@prisma/cli": "^2.0.0-beta.6",
"@prisma/cli": "^2.2.2",
"@types/bcryptjs": "^2.4.2",
"@types/express": "^4.17.3",
"@types/jest": "25.1.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
# Migration `20200711125803-branch-strategy`
# Migration `20200715232608-branch-strategy`

This migration has been generated by Pavel Strunkin at 7/11/2020, 12:58:03 PM.
This migration has been generated by Pavel Strunkin at 7/15/2020, 11:26:08 PM.
You can check out the [state of the schema](./schema.prisma) after the migration.

## Database Steps

```sql
ALTER TABLE "public"."Project" ADD COLUMN "mainBranchName" text NOT NULL DEFAULT E'master';

ALTER TABLE "public"."TestRun" ADD COLUMN "baselineBranchName" text ,
ADD COLUMN "branchName" text NOT NULL DEFAULT E'master';

ALTER TABLE "public"."TestVariation" ADD COLUMN "branchName" text NOT NULL DEFAULT E'master';
CREATE UNIQUE INDEX "TestVariation.name_browser_device_os_viewport_branchName" ON "public"."TestVariation"("name","browser","device","os","viewport","branchName")
```

## Changes

```diff
diff --git schema.prisma schema.prisma
migration 20200707182652-project-name-unique-constraint..20200711125803-branch-strategy
migration 20200707182652-project-name-unique-constraint..20200715232608-branch-strategy
--- datamodel.dml
+++ datamodel.dml
@@ -3,9 +3,9 @@
}
datasource db {
provider = "postgresql"
- url = "***"
+ url = env("DATABASE_URL")
+ url = "***"
}
model Build {
id String @default(uuid()) @id
Expand All @@ -39,7 +34,17 @@ migration 20200707182652-project-name-unique-constraint..20200711125803-branch-s
testVariations TestVariation[]
updatedAt DateTime @updatedAt
createdAt DateTime @default(now())
@@ -55,8 +56,10 @@
@@ -43,8 +44,9 @@
buildId String
build Build @relation(fields: [buildId], references: [id])
testVariationId String
testVariation TestVariation @relation(fields: [testVariationId], references: [id])
+ merge Boolean @default(false)
updatedAt DateTime @updatedAt
createdAt DateTime @default(now())
// Test variation data
name String @default("")
@@ -55,13 +57,16 @@
baselineName String?
ignoreAreas String @default("[]")
comment String?
Expand All @@ -49,15 +54,22 @@ migration 20200707182652-project-name-unique-constraint..20200711125803-branch-s
}
model TestVariation {
id String @default(uuid()) @id
@@ -71,8 +74,9 @@
project Project @relation(fields: [projectId], references: [id])
testRuns TestRun[]
name String
+ branchName String @default("master")
browser String?
device String?
os String?
viewport String?
@@ -73,8 +78,10 @@
baselines Baseline[]
comment String?
+ branchName String @default("master")
updatedAt DateTime @updatedAt
createdAt DateTime @default(now())
+
+ @@unique([name, browser, device, os, viewport, branchName])
}
model Baseline {
id String @default(uuid()) @id
```


Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ model TestRun {
build Build @relation(fields: [buildId], references: [id])
testVariationId String
testVariation TestVariation @relation(fields: [testVariationId], references: [id])
merge Boolean @default(false)
updatedAt DateTime @updatedAt
createdAt DateTime @default(now())
// Test variation data
Expand All @@ -64,6 +65,7 @@ model TestRun {
model TestVariation {
id String @default(uuid()) @id
name String
branchName String @default("master")
browser String?
device String?
os String?
Expand All @@ -75,9 +77,10 @@ model TestVariation {
testRuns TestRun[]
baselines Baseline[]
comment String?
branchName String @default("master")
updatedAt DateTime @updatedAt
createdAt DateTime @default(now())

@@unique([name, browser, device, os, viewport, branchName])
}

model Baseline {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,38 @@
"argument": "",
"value": "\"master\""
},
{
"tag": "CreateField",
"model": "TestRun",
"field": "merge",
"type": "Boolean",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "TestRun",
"field": "merge"
},
"directive": "default"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "TestRun",
"field": "merge"
},
"directive": "default"
},
"argument": "",
"value": "false"
},
{
"tag": "CreateField",
"model": "TestRun",
Expand Down Expand Up @@ -103,6 +135,22 @@
},
"argument": "",
"value": "\"master\""
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Model",
"model": "TestVariation",
"arguments": [
{
"name": "",
"value": "[name, browser, device, os, viewport, branchName]"
}
]
},
"directive": "unique"
}
}
]
}
2 changes: 1 addition & 1 deletion prisma/migrations/migrate.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
20200526195312-approved-test-status-added
20200627134248-comment-added
20200707182652-project-name-unique-constraint
20200711125803-branch-strategy
20200715232608-branch-strategy
68 changes: 61 additions & 7 deletions prisma/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading