Module: Torque::PostgreSQL::Migration::CommandRecorder

Defined in:
lib/torque/postgresql/migration/command_recorder.rb

Instance Method Summary collapse

Instance Method Details

#create_schema(*args, &block) ⇒ Object

Records the creation of a schema



19
20
21
# File 'lib/torque/postgresql/migration/command_recorder.rb', line 19

def create_schema(*args, &block)
  record(:create_schema, args, &block)
end

#invert_create_schema(args) ⇒ Object

Inverts the creation of a schema



24
25
26
# File 'lib/torque/postgresql/migration/command_recorder.rb', line 24

def invert_create_schema(args)
  [:drop_schema, [args.first]]
end

#invert_rename_type(args) ⇒ Object

Inverts the type rename operation



14
15
16
# File 'lib/torque/postgresql/migration/command_recorder.rb', line 14

def invert_rename_type(args)
  [:rename_type, args.reverse]
end

#rename_type(*args, &block) ⇒ Object

Records the rename operation for types



9
10
11
# File 'lib/torque/postgresql/migration/command_recorder.rb', line 9

def rename_type(*args, &block)
  record(:rename_type, args, &block)
end