class ROM::Cassandra::Migrations::RunnerUp
Runs migration up, registers it in Cassandra
table and logs the change.
@api private
Public Instance Methods
apply()
click to toggle source
Moves the migration forward
@return [undefined]
# File lib/rom/cassandra/migrations/runner_up.rb, line 25 def apply migration.up end
log()
click to toggle source
Logs the result of the operation
@return [undefined]
# File lib/rom/cassandra/migrations/runner_up.rb, line 42 def log logger.info "Apply migration #{version}\n" end
migrate?()
click to toggle source
Checks if the version has been registered yet
@return [Boolean]
# File lib/rom/cassandra/migrations/runner_up.rb, line 17 def migrate? select_version.empty? end
register()
click to toggle source
Registers the version in Cassandra
db
@return [Array] an empty array
# File lib/rom/cassandra/migrations/runner_up.rb, line 33 def register session.call "INSERT INTO rom.migrations (version)" \ " VALUES ('#{version}');" end