Class: PGTrunk::Operations::Enums::RenameEnum
- Inherits:
-
Base
show all
- Defined in:
- lib/pg_trunk/operations/enums/rename_enum.rb
Instance Method Summary
collapse
Methods inherited from Base
#value
#quote
#dump, #to_a, #to_opts, #to_ruby
#invert!, #irreversible!
#error_messages
#attributes, #initialize
Instance Method Details
#invert ⇒ Object
30
31
32
|
# File 'lib/pg_trunk/operations/enums/rename_enum.rb', line 30
def invert
self.class.new(**to_h, name: new_name, to: name)
end
|
#to_sql(_version) ⇒ Object
26
27
28
|
# File 'lib/pg_trunk/operations/enums/rename_enum.rb', line 26
def to_sql(_version)
[*change_schema, *change_name].join("; ")
end
|