Module: PgPower::Migration::CommandRecorder::ExtensionMethods

Included in:
PgPower::Migration::CommandRecorder
Defined in:
lib/pg_power/migration/command_recorder/extension_methods.rb

Overview

Provides methods to extend ActiveRecord::Migration::CommandRecorder to support extensions feature.

Instance Method Summary collapse

Instance Method Details

#create_extension(*args) ⇒ Object

:nodoc:



5
6
7
# File 'lib/pg_power/migration/command_recorder/extension_methods.rb', line 5

def create_extension(*args)
  record(:create_extension, args)
end

#drop_extension(*args) ⇒ Object

:nodoc:



10
11
12
# File 'lib/pg_power/migration/command_recorder/extension_methods.rb', line 10

def drop_extension(*args)
  record(:drop_extension, args)
end

#invert_create_extension(args) ⇒ Object

:nodoc:



15
16
17
18
# File 'lib/pg_power/migration/command_recorder/extension_methods.rb', line 15

def invert_create_extension(args)
  extension_name = args.first
  [:drop_extension, [extension_name]]
end

#invert_drop_extension(args) ⇒ Object

:nodoc:



21
22
23
24
# File 'lib/pg_power/migration/command_recorder/extension_methods.rb', line 21

def invert_drop_extension(args)
  extension_name = args.first
  [:create_extension, [extension_name]]
end