prismix icon indicating copy to clipboard operation
prismix copied to clipboard

How can i reuse enums?

Open juan-giraldo-chintai opened this issue 3 years ago • 3 comments

I have an Enum(countries) that several tables need to use it in some fields. I was wondering if there is any way to reuse it instead of having to copy it with different names on each schema that uses it

juan-giraldo-chintai avatar Dec 19 '21 19:12 juan-giraldo-chintai

code code2

thize avatar Mar 31 '22 11:03 thize

Does this mean you should copy the entire enum to each .prisma file?

ethancadoo avatar Jul 07 '22 15:07 ethancadoo

That was actually my question, the problem is you need to copy the enum on each file and last time I've checked using different names so they don't collide while merging files

juan-giraldo-chintai avatar Aug 31 '22 11:08 juan-giraldo-chintai