Module: ActiveRecord::Sequence::CommandRecorder

Defined in:
lib/active_record/sequence/command_recorder.rb

Instance Method Summary collapse

Instance Method Details

#create_sequence(name, options = {}) ⇒ Object



6
7
8
# File 'lib/active_record/sequence/command_recorder.rb', line 6

def create_sequence(name, options = {})
  record(__method__, [name, options])
end

#drop_sequence(name) ⇒ Object



10
11
12
# File 'lib/active_record/sequence/command_recorder.rb', line 10

def drop_sequence(name)
  record(__method__, [name])
end

#invert_create_sequence(args) ⇒ Object



14
15
16
17
# File 'lib/active_record/sequence/command_recorder.rb', line 14

def invert_create_sequence(args)
  name, = args
  [:drop_sequence, [name]]
end