class Cassie::Schema::RollbackCommand

Attributes

version[R]

Public Class Methods

new(version) click to toggle source
# File lib/cassie/schema/rollback_command.rb, line 5
def initialize(version)
  @version = version
end

Public Instance Methods

direction() click to toggle source
# File lib/cassie/schema/rollback_command.rb, line 9
def direction
  :down
end
execute() click to toggle source
# File lib/cassie/schema/rollback_command.rb, line 13
def execute
  version.migration.down
  remove_from_history
end

Protected Instance Methods

remove_from_history() click to toggle source
# File lib/cassie/schema/rollback_command.rb, line 20
def remove_from_history
  Cassie::Schema.forget_version(version)
end