Does anyone know if you're able to set enum values...
# help
m
Does anyone know if you're able to set enum values in supabase? i'm unfamiliar with postgres, and i've been using the GUI mostly for creating rows
s
Yeah - the dashboard does support enums, but you have to create them via SQL first:
Copy code
sql
CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy')
Once you've done that, you'll be able to add or edit a column type via the dashboard to use this type
m
okay awesome, can I add this to an already existing table? sorry if this is a stupid question I'm still new to sql
s
Enums are schema specific, so you'll be able to use it with any table, whether it already exists or not. For example, if you add it to the
public
schema, any table within that schema will be able to have a column with the enum type you create.
m
awesome, thank you for the clarification I appreciate it