class ROM::Cassandra::Migrations::RunnerDown
Runs migration up, registers it in Cassandra
table and logs the change.
@api private
Public Instance Methods
apply()
click to toggle source
Rolls back the migration
@return [undefined]
# File lib/rom/cassandra/migrations/runner_down.rb, line 25 def apply migration.down end
log()
click to toggle source
Logs the result of the operation
@return [undefined]
# File lib/rom/cassandra/migrations/runner_down.rb, line 41 def log logger.info "Roll back migration #{version}\n" end
migrate?()
click to toggle source
Checks if the version hasn’t been registered yet
@return [Boolean]
# File lib/rom/cassandra/migrations/runner_down.rb, line 17 def migrate? select_version.any? end
register()
click to toggle source
Removes the version from Cassandra
db
@return [Array] an empty array
# File lib/rom/cassandra/migrations/runner_down.rb, line 33 def register session.call "DELETE FROM rom.migrations WHERE version = '#{version}';" end