Class: PGTrunk::Operations::CheckConstraints::AddCheckConstraint
- Inherits:
-
Base
show all
- Defined in:
- lib/pg_trunk/operations/check_constraints/add_check_constraint.rb
Instance Method Summary
collapse
Methods inherited from Base
#<=>
#quote
#dump, #to_a, #to_opts, #to_ruby
#invert!, #irreversible!
#error_messages
#attributes, #initialize
Instance Method Details
#invert ⇒ Object
83
84
85
|
# File 'lib/pg_trunk/operations/check_constraints/add_check_constraint.rb', line 83
def invert
DropCheckConstraint.new(**to_h)
end
|
#to_sql(_version) ⇒ Object
79
80
81
|
# File 'lib/pg_trunk/operations/check_constraints/add_check_constraint.rb', line 79
def to_sql(_version)
[add_constraint, *, register_constraint].compact.join(" ")
end
|