Skip to content

Commit

Permalink
chore(deps): update engines to 5.20.0-12.06fc58a368dc7be9fbbbe894adf8…
Browse files Browse the repository at this point in the history
…d445d208c284 (#25266)

* chore(deps): update engines to 5.20.0-12.06fc58a368dc7be9fbbbe894adf8d445d208c284

* tests(client): fix tests after prisma/prisma-engines#5002

* tests(client): fix snapshots

* tests(client): fix snapshots

---------

Co-authored-by: jkomyno <[email protected]>
Co-authored-by: Alberto Schiabel <[email protected]>
  • Loading branch information
3 people authored Sep 24, 2024
1 parent b2c080e commit bf237ff
Show file tree
Hide file tree
Showing 17 changed files with 176 additions and 197 deletions.
4 changes: 2 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
"@prisma/debug": "workspace:*",
"@prisma/driver-adapter-utils": "workspace:*",
"@prisma/engines": "workspace:*",
"@prisma/engines-version": "5.20.0-8.c9ff5773c72b821ff6daf2c55dbe3809eae7c2c7",
"@prisma/engines-version": "5.20.0-12.06fc58a368dc7be9fbbbe894adf8d445d208c284",
"@prisma/fetch-engine": "workspace:*",
"@prisma/generator-helper": "workspace:*",
"@prisma/get-platform": "workspace:*",
Expand All @@ -208,7 +208,7 @@
"@prisma/migrate": "workspace:*",
"@prisma/mini-proxy": "0.9.5",
"@prisma/pg-worker": "workspace:*",
"@prisma/query-engine-wasm": "5.20.0-8.c9ff5773c72b821ff6daf2c55dbe3809eae7c2c7",
"@prisma/query-engine-wasm": "5.20.0-12.06fc58a368dc7be9fbbbe894adf8d445d208c284",
"@snaplet/copycat": "0.17.3",
"@swc-node/register": "1.10.9",
"@swc/core": "1.6.13",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('referentialActions-onDelete-default-foreign-key-error(mysql)', () => {
45
46 try {
→ 47 await prisma.user.delete(
Foreign key constraint failed on the field: \`authorId\`
Foreign key constraint violated: \`authorId\`
`)
expect(await prisma.user.findMany()).toHaveLength(1)
expect(await prisma.profile.findMany()).toHaveLength(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('referentialActions-onDelete-default-foreign-key-error(postgresql)', ()
46
47 try {
→ 48 await prisma.user.delete(
Foreign key constraint failed on the field: \`Post_authorId_fkey (index)\`
Foreign key constraint violated: \`Post_authorId_fkey (index)\`
`)
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('referentialActions-onDelete-default-foreign-key-error(sqlite)', () =>
39
40 try {
→ 41 await prisma.user.delete(
Foreign key constraint failed on the field: \`foreign key\`
Foreign key constraint violated: \`foreign key\`
`)
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describeIf(!process.env.TEST_SKIP_MSSQL)('referentialActions-onDelete-default-fo
47
48 try {
→ 49 await prisma.user.delete(
Foreign key constraint failed on the field: \`Post_authorId_fkey (index)\`
Foreign key constraint violated: \`Post_authorId_fkey (index)\`
`)
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AdapterProviders, Providers } from '../_utils/providers'
import { ConditionalError } from '../_utils/relationMode/conditionalError'
import testMatrix from './_matrix'

/* eslint-disable @typescript-eslint/no-unused-vars, jest/no-identical-title */
/* eslint-disable @typescript-eslint/no-unused-vars */

// @ts-ignore this is just for type checks
declare let prisma: import('@prisma/client').PrismaClient
Expand Down Expand Up @@ -93,7 +93,7 @@ testMatrix.setupTestSuite(
).rejects.toThrow(
conditionalError.snapshot({
foreignKeys: {
[Providers.MYSQL]: 'Foreign key constraint failed on the field: `userId`',
[Providers.MYSQL]: 'Foreign key constraint violated: `userId`',
},
}),
)
Expand Down Expand Up @@ -148,18 +148,14 @@ testMatrix.setupTestSuite(
).rejects.toThrow(
conditionalError.snapshot({
foreignKeys: {
[Providers.POSTGRESQL]:
'Foreign key constraint failed on the field: `ProfileOneToOne_userId_fkey (index)`',
[Providers.COCKROACHDB]: 'Foreign key constraint failed on the field: `(not available)`',
[Providers.MYSQL]: 'Foreign key constraint failed on the field: `userId`',
[Providers.SQLSERVER]:
'Foreign key constraint failed on the field: `ProfileOneToOne_userId_fkey (index)`',
[Providers.SQLITE]: 'Foreign key constraint failed on the field: `foreign key`',
[Providers.POSTGRESQL]: 'Foreign key constraint violated: `ProfileOneToOne_userId_fkey (index)`',
[Providers.COCKROACHDB]: 'Foreign key constraint violated: `ProfileOneToOne_userId_fkey (index)`',
[Providers.MYSQL]: 'Foreign key constraint violated: `userId`',
[Providers.SQLSERVER]: 'Foreign key constraint violated: `ProfileOneToOne_userId_fkey (index)`',
[Providers.SQLITE]: 'Foreign key constraint violated: `foreign key`',
[AdapterProviders.JS_D1]: 'D1_ERROR: FOREIGN KEY constraint failed',
[AdapterProviders.JS_NEON]:
'Foreign key constraint failed on the field: `ProfileOneToOne_userId_fkey (index)`',
[AdapterProviders.JS_PG]:
'Foreign key constraint failed on the field: `ProfileOneToOne_userId_fkey (index)`',
[AdapterProviders.JS_NEON]: 'Foreign key constraint violated: `ProfileOneToOne_userId_fkey (index)`',
[AdapterProviders.JS_PG]: 'Foreign key constraint violated: `ProfileOneToOne_userId_fkey (index)`',
},
}),
)
Expand All @@ -178,7 +174,7 @@ testMatrix.setupTestSuite(
).rejects.toThrow(
conditionalError.snapshot({
foreignKeys: {
[Providers.MYSQL]: 'Foreign key constraint failed on the field: `userId`',
[Providers.MYSQL]: 'Foreign key constraint violated: `userId`',
},
}),
)
Expand Down Expand Up @@ -228,18 +224,14 @@ testMatrix.setupTestSuite(
).rejects.toThrow(
conditionalError.snapshot({
foreignKeys: {
[Providers.POSTGRESQL]:
'Foreign key constraint failed on the field: `ProfileOneToOne_userId_fkey (index)`',
[Providers.COCKROACHDB]: 'Foreign key constraint failed on the field: `(not available)`',
[Providers.MYSQL]: 'Foreign key constraint failed on the field: `userId`',
[Providers.SQLSERVER]:
'Foreign key constraint failed on the field: `ProfileOneToOne_userId_fkey (index)`',
[Providers.SQLITE]: 'Foreign key constraint failed on the field: `foreign key`',
[Providers.POSTGRESQL]: 'Foreign key constraint violated: `ProfileOneToOne_userId_fkey (index)`',
[Providers.COCKROACHDB]: 'Foreign key constraint violated: `ProfileOneToOne_userId_fkey (index)`',
[Providers.MYSQL]: 'Foreign key constraint violated: `userId`',
[Providers.SQLSERVER]: 'Foreign key constraint violated: `ProfileOneToOne_userId_fkey (index)`',
[Providers.SQLITE]: 'Foreign key constraint violated: `foreign key`',
[AdapterProviders.JS_D1]: 'D1_ERROR: FOREIGN KEY constraint failed',
[AdapterProviders.JS_NEON]:
'Foreign key constraint failed on the field: `ProfileOneToOne_userId_fkey (index)`',
[AdapterProviders.JS_PG]:
'Foreign key constraint failed on the field: `ProfileOneToOne_userId_fkey (index)`',
[AdapterProviders.JS_NEON]: 'Foreign key constraint violated: `ProfileOneToOne_userId_fkey (index)`',
[AdapterProviders.JS_PG]: 'Foreign key constraint violated: `ProfileOneToOne_userId_fkey (index)`',
},
}),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AdapterProviders, Providers } from '../_utils/providers'
import { ConditionalError } from '../_utils/relationMode/conditionalError'
import testMatrix from './_matrix'

/* eslint-disable @typescript-eslint/no-unused-vars, jest/no-identical-title */
/* eslint-disable @typescript-eslint/no-unused-vars */

// @ts-ignore this is just for type checks
declare let prisma: import('@prisma/client').PrismaClient
Expand Down Expand Up @@ -95,7 +95,7 @@ testMatrix.setupTestSuite(
).rejects.toThrow(
conditionalError.snapshot({
foreignKeys: {
[Providers.MYSQL]: 'Foreign key constraint failed on the field: `userId`',
[Providers.MYSQL]: 'Foreign key constraint violated: `userId`',
},
}),
)
Expand Down Expand Up @@ -150,18 +150,14 @@ testMatrix.setupTestSuite(
).rejects.toThrow(
conditionalError.snapshot({
foreignKeys: {
[Providers.POSTGRESQL]:
'Foreign key constraint failed on the field: `PostOneToMany_userId_fkey (index)`',
[Providers.COCKROACHDB]: 'Foreign key constraint failed on the field: `(not available)`',
[Providers.MYSQL]: 'Foreign key constraint failed on the field: `userId`',
[Providers.SQLSERVER]:
'Foreign key constraint failed on the field: `PostOneToMany_userId_fkey (index)`',
[Providers.SQLITE]: 'Foreign key constraint failed on the field: `foreign key`',
[Providers.POSTGRESQL]: 'Foreign key constraint violated: `PostOneToMany_userId_fkey (index)`',
[Providers.COCKROACHDB]: 'Foreign key constraint violated: `PostOneToMany_userId_fkey (index)`',
[Providers.MYSQL]: 'Foreign key constraint violated: `userId`',
[Providers.SQLSERVER]: 'Foreign key constraint violated: `PostOneToMany_userId_fkey (index)`',
[Providers.SQLITE]: 'Foreign key constraint violated: `foreign key`',
[AdapterProviders.JS_D1]: 'D1_ERROR: FOREIGN KEY constraint failed',
[AdapterProviders.JS_NEON]:
'Foreign key constraint failed on the field: `PostOneToMany_userId_fkey (index)`',
[AdapterProviders.JS_PG]:
'Foreign key constraint failed on the field: `PostOneToMany_userId_fkey (index)`',
[AdapterProviders.JS_NEON]: 'Foreign key constraint violated: `PostOneToMany_userId_fkey (index)`',
[AdapterProviders.JS_PG]: 'Foreign key constraint violated: `PostOneToMany_userId_fkey (index)`',
},
}),
)
Expand All @@ -180,7 +176,7 @@ testMatrix.setupTestSuite(
).rejects.toThrow(
conditionalError.snapshot({
foreignKeys: {
[Providers.MYSQL]: 'Foreign key constraint failed on the field: `userId`',
[Providers.MYSQL]: 'Foreign key constraint violated: `userId`',
},
}),
)
Expand Down Expand Up @@ -230,18 +226,14 @@ testMatrix.setupTestSuite(
).rejects.toThrow(
conditionalError.snapshot({
foreignKeys: {
[Providers.POSTGRESQL]:
'Foreign key constraint failed on the field: `PostOneToMany_userId_fkey (index)`',
[Providers.COCKROACHDB]: 'Foreign key constraint failed on the field: `(not available)`',
[Providers.MYSQL]: 'Foreign key constraint failed on the field: `userId`',
[Providers.SQLSERVER]:
'Foreign key constraint failed on the field: `PostOneToMany_userId_fkey (index)`',
[Providers.SQLITE]: 'Foreign key constraint failed on the field: `foreign key`',
[Providers.POSTGRESQL]: 'Foreign key constraint violated: `PostOneToMany_userId_fkey (index)`',
[Providers.COCKROACHDB]: 'Foreign key constraint violated: `PostOneToMany_userId_fkey (index)`',
[Providers.MYSQL]: 'Foreign key constraint violated: `userId`',
[Providers.SQLSERVER]: 'Foreign key constraint violated: `PostOneToMany_userId_fkey (index)`',
[Providers.SQLITE]: 'Foreign key constraint violated: `foreign key`',
[AdapterProviders.JS_D1]: 'D1_ERROR: FOREIGN KEY constraint failed',
[AdapterProviders.JS_NEON]:
'Foreign key constraint failed on the field: `PostOneToMany_userId_fkey (index)`',
[AdapterProviders.JS_PG]:
'Foreign key constraint failed on the field: `PostOneToMany_userId_fkey (index)`',
[AdapterProviders.JS_NEON]: 'Foreign key constraint violated: `PostOneToMany_userId_fkey (index)`',
[AdapterProviders.JS_PG]: 'Foreign key constraint violated: `PostOneToMany_userId_fkey (index)`',
},
}),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ testMatrix.setupTestSuite(
).rejects.toThrow(
conditionalError.snapshot({
foreignKeys: {
[Providers.POSTGRESQL]: 'Foreign key constraint failed on the field: `Main_aliceId_fkey (index)`',
[Providers.COCKROACHDB]: 'Foreign key constraint failed on the field: `(not available)`',
[Providers.MYSQL]: 'Foreign key constraint failed on the field: `aliceId`',
[Providers.SQLSERVER]: 'Foreign key constraint failed on the field: `Main_aliceId_fkey (index)`',
[Providers.SQLITE]: 'Foreign key constraint failed on the field: `foreign key`',
[Providers.POSTGRESQL]: 'Foreign key constraint violated: `Main_aliceId_fkey (index)`',
[Providers.COCKROACHDB]: 'Foreign key constraint violated: `Main_aliceId_fkey (index)`',
[Providers.MYSQL]: 'Foreign key constraint violated: `aliceId`',
[Providers.SQLSERVER]: 'Foreign key constraint violated: `Main_aliceId_fkey (index)`',
[Providers.SQLITE]: 'Foreign key constraint violated: `foreign key`',
[AdapterProviders.JS_D1]: 'D1_ERROR: FOREIGN KEY constraint failed',
[AdapterProviders.JS_NEON]: 'Foreign key constraint failed on the field: `Main_aliceId_fkey (index)`',
[AdapterProviders.JS_PG]: 'Foreign key constraint failed on the field: `Main_aliceId_fkey (index)`',
[AdapterProviders.JS_PLANETSCALE]: 'Foreign key constraint failed on the field: `aliceId',
[AdapterProviders.JS_NEON]: 'Foreign key constraint violated: `Main_aliceId_fkey (index)`',
[AdapterProviders.JS_PG]: 'Foreign key constraint violated: `Main_aliceId_fkey (index)`',
[AdapterProviders.JS_PLANETSCALE]: 'Foreign key constraint violated: `aliceId',
},
prisma: errors[onDelete],
}),
Expand Down
Loading

0 comments on commit bf237ff

Please sign in to comment.