File tree Expand file tree Collapse file tree 1 file changed +9
-19
lines changed Expand file tree Collapse file tree 1 file changed +9
-19
lines changed Original file line number Diff line number Diff line change 1- import { PrismaClient } from '@prisma/client' ;
1+ import { PrismaClient , TestVariation } from '@prisma/client' ;
22
33const prisma = new PrismaClient ( {
44 // log: ['query'],
@@ -32,24 +32,14 @@ async function setEmptyTestVariationTags_github_243() {
3232 return ;
3333 }
3434 console . info ( `Going to apply migration ${ migrationKey } ...` ) ;
35- const testVariations = await prisma . testVariation . findMany ( {
36- where : {
37- OR : [
38- {
39- os : undefined ,
40- } ,
41- {
42- device : undefined ,
43- } ,
44- {
45- browser : undefined ,
46- } ,
47- {
48- viewport : undefined ,
49- } ,
50- ] ,
51- } ,
52- } ) ;
35+ const testVariations = ( await prisma . $queryRaw `
36+ SELECT * from "public"."TestVariation"
37+ WHERE
38+ "public"."TestVariation"."browser" IS NULL OR
39+ "public"."TestVariation"."os" IS NULL OR
40+ "public"."TestVariation"."device" IS NULL OR
41+ "public"."TestVariation"."viewport" IS NULL
42+ ` ) as Array < TestVariation > ;
5343
5444 return Promise . all (
5545 testVariations . map ( ( testVariation ) =>
You can’t perform that action at this time.
0 commit comments