Skip to content

Commit

Permalink
fix(generator-helper): Fix DMMF field dbName name and type (#18694)
Browse files Browse the repository at this point in the history
  • Loading branch information
luxaritas committed May 3, 2023
1 parent 2376be2 commit ba05696
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/Doctor.ts
Expand Up @@ -107,7 +107,7 @@ ${bold('Examples')}
remoteModel: remoteModels[localModel.dbName ?? localModel.name],
}))

const getFieldName = (f: DMMF.Field) => (f.dbNames && f.dbNames.length > 0 ? f.dbNames[0] : f.name)
const getFieldName = (f: DMMF.Field) => f.dbName ?? f.name

const messages: string[] = []

Expand Down
2 changes: 1 addition & 1 deletion packages/generator-helper/src/dmmf.ts
Expand Up @@ -81,7 +81,7 @@ export namespace DMMF {
* BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName
*/
type: string
dbNames?: string[] | null
dbName?: string | null
hasDefaultValue: boolean
default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]
relationFromFields?: string[]
Expand Down

0 comments on commit ba05696

Please sign in to comment.