Class: DynamoDB::Migration::Execute

Inherits:
Object
  • Object
show all
Defined in:
lib/dynamodb/migration/execute.rb

Constant Summary collapse

DEFAULT_MIGRATION_TABLE_NAME =
'migrations'

Instance Method Summary collapse

Constructor Details

#initialize(client, migration_table_name) ⇒ Execute

Returns a new instance of Execute.



6
7
8
9
# File 'lib/dynamodb/migration/execute.rb', line 6

def initialize(client, migration_table_name)
  @client = client
  @migration_table_name = migration_table_name
end

Instance Method Details

#update_allObject



11
12
13
14
15
16
# File 'lib/dynamodb/migration/execute.rb', line 11

def update_all
  ensure_migrations_table_exists
  migration_classes.each do |clazz|
    apply_migration(clazz)
  end
end