Method: ActiveRecord::Migration#create_enum
- Defined in:
- lib/pg_trunk/operations/enums/create_enum.rb
#create_enum(name, **options) {|e| ... } ⇒ void
This method returns an undefined value.
Create an enumerated type by qualified name
create_enum "finances.currency" do |e|
e.values "BTC", "EUR", "GBP", "USD"
e.value "JPY" # the alternative way to add a value to the tail
e.comment <<~COMMENT
The list of values for supported currencies.
COMMENT
end
It is always reversible.
22 |
# File 'lib/pg_trunk/operations/enums/create_enum.rb', line 22 def create_enum(name, **, &block); end |