Invalid Input Value for Enum
Hello! I am using a enum but running into a weird issue when trying to set the value as one of options in enum. The following is the sections from my schema:
Error:
Error: invalid input value for enum status: "expired"
Drizzle Schema Table:
Drizzle Schema Enum:
Any idea why this might be? Thanks!Solution:Jump to solution
Update for anyone who finds this in the future, I went ahead and found the following article which I used to modify the migration. All seems to be working now!
Article: https://www.munderwood.ca/index.php/2015/05/28/altering-postgresql-columns-from-one-enum-to-another/
New Migration:...
3 Replies
Can you show the migration that was generated for that enum?
Hey @Angelelz! Apologies for the delay. I solved the first part, which is that I had 2 enums sharing the name
status
. I have now updated the name of it and the other enum that shared the name but am running into a issue applying this migration. I get the error:
PostgresError: column "status" cannot be cast automatically to type discord_status
Here is the migration:
Solution
Update for anyone who finds this in the future, I went ahead and found the following article which I used to modify the migration. All seems to be working now!
Article: https://www.munderwood.ca/index.php/2015/05/28/altering-postgresql-columns-from-one-enum-to-another/
New Migration: