After Prisma v6.7.0 upgrade and huge migration imports, I am facing this typedSql-related error
Unable to solve this problem, is it normal for these typed SQL generated files to have duplicate properties? For example, the main errors are duplicate properties in the generated TS file e.g (see how id field is here twice, along with various other fields):
export namespace titleDescListings {
export type Parameters = [userId: string, type: string, take: number, skip: number]
export type Result = {
id: number
year: number
make: string
make_id: string | null
model: string | null
model_id: string | null
model_series: string | null
model_series_id: string | null
vin: string | null
vrm: string | null
previous_keepers: number | null
title: string | null
description: string | null
user_id: string
status: $DbEnums["ListingStatus"]
step: number
created_at: Date
updated_at: Date
mot_expiry: Date | null
tax_expiry: Date | null
country: string | null
doors: string | null
odometer_reading: number | null
odometer_unit: $DbEnums["OdometerUnit"] | null
body_style: $DbEnums["BodyStyle"] | null
path: string
valuation_id: number
id: number
estimated_market_value: bigint
base_currency: $DbEnums["Currency"]
purchase_price: bigint | null
}
}

7 Replies
You chose to debug with a human. They'll tinker with your query soon. If you get curious meanwhile, hop into
#ask-ai
for a quick spin!Does this error go away if you downgrade to prisma 6.6.0?
I want to see if this issue was introduced in latest prisma release
Unfortunately, due to 6.7.0 issues I had to migrate all of my imports to import directly from the /enums.ts file so now I have a lot of issues when downgrading to 6.6.0

I'd rather try and solve for the 91 TypeScript errors in the prisma/generated directory, it's a lot less work ha
If I remove the --sql flag from generate, the only file erroring out due to typescript is prisma/generated/prisma/internal/class.ts

Also, all the files that depend on the typedSql imports
I had the same issue with the prisma-generator provider in 6.6.0