Class: PGTrunk::Operations::Enums::CreateEnum

Inherits:
Base show all
Defined in:
lib/pg_trunk/operations/enums/create_enum.rb

Instance Method Summary collapse

Methods inherited from Base

#value

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



54
55
56
# File 'lib/pg_trunk/operations/enums/create_enum.rb', line 54

def invert
  DropEnum.new(**to_h)
end

#to_sql(_version) ⇒ Object



50
51
52
# File 'lib/pg_trunk/operations/enums/create_enum.rb', line 50

def to_sql(_version)
  [create_enum, *create_comment, register_enum].join(" ")
end