How to work with PostgreSQL enums in Rails 7
Examples of creating an enum type, renaming a value, deleting a value
Sep 21, 20224 min read7.2K

Search for a command to run...
Articles tagged with #postgresql
Examples of creating an enum type, renaming a value, deleting a value

Context You have a column in your table that is used as an array , like this: t.string 'ids', array: true And you want to select all records that have more than N elements in the array Solution In PostgreSQL, you can use cardinality to achieve ...