While creating an Ecto.Migration
I’d like to set a constraint like this:
deadline_relative_to text not null check (deadline_relative_to in ('day', 'week'))
at the database level (postgresql in this case)
I am familiar using the Ecto.Enum
data type in a scheme.
Appreciate a hint if its possible at all and if so a pointer to the documentation.