module DynamoDB::Migration

Constants

VERSION

Public Class Methods

registered(app) click to toggle source
# File lib/dynamodb/migration.rb, line 8
def registered(app)
  options = {
    client:                 app.dynamodb_client,
    path:                   app.settings.migrations_path,
    migration_table_name:   app.settings.migration_table_name,
  }
  run_all_migrations(options)
end
run_all_migrations(options) click to toggle source
# File lib/dynamodb/migration.rb, line 17
def run_all_migrations(options)
  Dir.glob("#{options[:path]}/**/*.rb").each do |file|
    require file
  end
  Execute.new(options[:client], options[:migration_table_name], options[:tags])
         .update_all
end