Hello, can we add enum type in @relationTable? `t...
# orm-help
h
Hello, can we add enum type in @relationTable?
type _ProductToHighlight_ @db(_name:_ "_ProductToHighlight") @relationTable {
product: Product
highlight: Highlight
highlightStatus: HighlightStatus @default(_value:_ APPROVED)
}
r
Hi @Harsh Makwana , Yes, you should be able to do that ..
h
How?

https://prisma.slack.com/files/U01074J4T2T/F01JVQSHJGY/screenshot_2021-01-07_at_12.33.45_pm.png

r
aah right - sorry I have a "manual" linking table without the
@relationTable
that looks like:
Copy code
enum ProviderContactType {
    REGISTER
    OTHER
}

model ContactToProvider {
    contact     Contact             @relation(fields: [contactId], references: [id])
    contactId   String
    provider    Provider            @relation(fields: [providerId], references: [id])
    providerId  String
    contactType ProviderContactType @default(OTHER)

    @@id([contactId, providerId])
}
links
contacts
and
providers
and has enum of
contactType
I missed the
@relationTable
in your question
h
In prisma 1?
I forgot to mention It’s prisma 1
r
aah - sorry, I haven't used that for a while 😕
h
it’s okay