Class: PGTrunk::Operations::Domains::CreateDomain

Inherits:
Base show all
Defined in:
lib/pg_trunk/operations/domains/create_domain.rb

Instance Method Summary collapse

Methods inherited from Base

#constraint

Methods included from PGTrunk::Operation::SQLHelpers

#quote

Methods included from PGTrunk::Operation::RubyHelpers

#dump, #to_a, #to_opts, #to_ruby

Methods included from PGTrunk::Operation::Inversion

#invert!, #irreversible!

Methods included from PGTrunk::Operation::Validations

#error_messages

Methods included from PGTrunk::Operation::Attributes

#attributes, #initialize

Instance Method Details

#invertObject



91
92
93
# File 'lib/pg_trunk/operations/domains/create_domain.rb', line 91

def invert
  DropDomain.new(**to_h)
end

#to_sql(_version) ⇒ Object



87
88
89
# File 'lib/pg_trunk/operations/domains/create_domain.rb', line 87

def to_sql(_version)
  [create_domain, *create_comment, register_domain].join(" ")
end