Inserting into columns of type Enum
Hi! I am not sure how to insert data into enum column type...
and query:
above code results in ungly error:
Found simmilar topic, but solution with adding cosnt to enum value does not work.
https://discord.com/channels/1043890932593987624/1120919676457848946
4 Replies
translated error
Isn't this an error coming from the database?
You might have not applied a migration, or the push didn't work. Basically the database is complaining the 'IN' is not a valid value for that column
Exactly; but I have no idea why this is a case. Migrations were done, table definition seems to be fine, insert statement also.
I changed column definition from
pgEnum
to text
type (as below) and it worked just fine If that shows the type that you like and it works, there you go