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