module ActiveRecord::PostgresEnum::CommandRecorder
Public Instance Methods
create_enum(name, values)
click to toggle source
# File lib/active_record/postgres_enum/command_recorder.rb, line 6 def create_enum(name, values) record(:create_enum, [name, values]) end
invert_create_enum(args)
click to toggle source
# File lib/active_record/postgres_enum/command_recorder.rb, line 10 def invert_create_enum(args) [:drop_enum, args.first] end
invert_rename_enum(args)
click to toggle source
# File lib/active_record/postgres_enum/command_recorder.rb, line 18 def invert_rename_enum(args) [:rename_enum, args.reverse] end
invert_rename_enum_value(args)
click to toggle source
# File lib/active_record/postgres_enum/command_recorder.rb, line 26 def invert_rename_enum_value(args) [:rename_enum_value, [args.first] + args.last(2).reverse] end
rename_enum(name, new_name)
click to toggle source
# File lib/active_record/postgres_enum/command_recorder.rb, line 14 def rename_enum(name, new_name) record(:rename_enum, [name, new_name]) end
rename_enum_value(name, existing_value, new_value)
click to toggle source
# File lib/active_record/postgres_enum/command_recorder.rb, line 22 def rename_enum_value(name, existing_value, new_value) record(:rename_enum_value, [name, existing_value, new_value]) end