I have some data that could be a combination of around 30 values. Typical
values could be 'TB', 'TF', 'D', 'U', '-D', 'OP', 'RM', or nil.
Ideally, I'd use the SET data type in PostgreSQL, but ActiveRecord doesn't
appear to support this. More specifically, I can run a migration on my
development database, but db/schema.rb contains a comment about an
I've considered creating 30 columns to model this, however I'm not convinced
that's efficient. I've also thought about separating each value with a :
and storing this - for example, ":TF:-D:" - whilst I can query for "WHERE
foo LIKE '%:D:%'", that probably isn't indexable as it's a text search.
Can anyone help me to come up with an efficient way to do this in Rails