Can't create records using enums

Hi! I’ve just started playing around with Thin, and I want to use enums for some of my columns. However, it won’t let me create a record if I do. The UI shows an error - “An error happened. An exception was raised while running the action”. Not much to go on there, so I tried doing it in my app to see if that gave any more clues and it’s complaining about an “invalid input syntax for type”, even though I’m passing a string.

Looking at the generated types, it’s treating all my enum columns as strings. I was expecting it to have generated enums for auto-completion, and it doesn’t offer suggestions in the Thin UI either. As a result, I have no idea what format it’s expecting me to provide the enums in.

If I make my enum columns nullable and don’t pass any data, then it allows me to create a record.

Any pointers on what I might be doing wrong? I’ve ensured I’ve migrated and installed the latest type definitions, etc.

You’re not doing anything wrong. We just haven’t implemented enum types yet.

I’ve just gone forward and implemented them. Could you update your types again? (before that make sure to make some kind of operation in the schema designer, like adding a column and then removing it again, to trigger a new type generation)

Thanks. I’ve done as you suggested, and it’s now generating the enums but it only assigns them to non-array enums. Even then, I still get the same error when actually trying to create a record. It won’t accept the enum value that I pass it.