Skip to content

bug: Unsupported attribute argument expression type: MemberAccessExpr #274

@genu

Description

@genu

There's an issue with running migrate when using relations (possibly other cases):

Using this schema, for example:

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model Comment {  
  id            String       @id
  author        User?     @relation(fields: [authorId], references: [id])
  authorId      String?   @default(auth().id) 
}

model User {
    id            String       @id
    email         String
    comments      Comment[]    
}

Running zen migrate dev, throws the following error:

Unhandled error: Error: Unsupported attribute argument expression type: MemberAccessExpr

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions