Would anyone be able to tell me how I can set up an enum-type field when creating a postgres table (using the integrated postgres offering)?
When I try to do so, I get a toast saying Create table error: type "enum" does not exist. I haven’t be able to find any documentation on how to define my enum values.
Thanks for highlighting it! And it seems like enum creation was not implemented in our built-in DB editor
Sorry for the inconveniences! I’ve created an internal feature request regarding enum creation.
Please use such a query as a workaround (via Data Sources → Query Runner):
CREATE TYPE difficulty AS ENUM('easy', 'medium', 'hard');
ALTER TABLE public.sample_table
ADD COLUMN difficulty difficulty;
Don’t forget to press “Sync” button after query run.