Skip to content

Commit cdcc8ce

Browse files
authored
fix: query change to executeRaw (#148)
* fix: query change to executeRaw * Update index.spec.ts
1 parent e501a14 commit cdcc8ce

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

prisma/manual_migrations.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,16 @@ async function setEmptyTestVariationTags_github_243() {
4343

4444
return Promise.all(
4545
testVariations.map((testVariation) =>
46-
prisma.testVariation.update({
47-
where: { id: testVariation.id },
48-
data: {
49-
os: testVariation.os ?? '',
50-
device: testVariation.device ?? '',
51-
browser: testVariation.browser ?? '',
52-
viewport: testVariation.viewport ?? '',
53-
},
54-
})
46+
prisma.$executeRaw`UPDATE "public"."TestVariation"
47+
SET
48+
"os" = ${testVariation.os ?? 'NULL::text'},
49+
"device" = ${testVariation.device ?? 'NULL::text'},
50+
"browser" = ${testVariation.browser ?? 'NULL::text'},
51+
"viewport" = ${testVariation.viewport ?? 'NULL::text'}
52+
WHERE
53+
"id" = ${testVariation.id}`
5554
)
56-
).then(() => console.info(`Finished migration ${migrationKey}`));
55+
).then(() => console.info(`Finished migration ${migrationKey}`))
5756
}
5857

5958
async function manualMigrations() {

src/compare/utils/index.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { PNG } from 'pngjs';
2-
import { IgnoreAreaDto } from 'src/test-runs/dto/ignore-area.dto';
3-
import { generatePng } from 'src/_data_';
2+
import { IgnoreAreaDto } from '../../test-runs/dto/ignore-area.dto';
3+
import { generatePng } from '../../_data_';
44
import { applyIgnoreAreas } from '.';
55

66
describe('utils', () => {

0 commit comments

Comments
 (0)