Prisma 1 Forum

Rename directive on enum type causes field to be deleted

I’m looking to rename one of my enum fields with the @rename directive, but it appears to not work.

enum State {


enum State {
  UNRECORDED_DRAFT @rename(oldName: DRAFT)

What I expect to happen is the DRAFT enum gets renamed to UNRECORDED_DRAFT

But I receive the following error:


    ✖ You are deleting the value 'DRAFT' of the enum 'State', but that value is in use.

I was not expecting an error to appear, but a warning that the field is in use so I could force the change.

Is renaming an ENUM supported or perhaps I’m understanding the @rename directive incorrectly.


This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.