Class: PGTrunk::Operations::Views::RenameView
- Inherits:
-
Base
show all
- Defined in:
- lib/pg_trunk/operations/views/rename_view.rb
Instance Method Summary
collapse
#quote
#dump, #to_a, #to_opts, #to_ruby
#invert!, #irreversible!
#error_messages
#attributes, #initialize
Instance Method Details
#invert ⇒ Object
41
42
43
44
|
# File 'lib/pg_trunk/operations/views/rename_view.rb', line 41
def invert
irreversible!("if_exists: true") if if_exists
self.class.new(**to_h, name: new_name, to: name)
end
|
#to_sql(_version) ⇒ Object
37
38
39
|
# File 'lib/pg_trunk/operations/views/rename_view.rb', line 37
def to_sql(_version)
[*change_schema, *change_name].join("; ")
end
|