Class: HecksAdapters::DynamoDB::Migrate

Inherits:
Object
  • Object
show all
Defined in:
lib/migrate.rb

Overview

Creates tables according to your domain spec

Instance Method Summary collapse

Constructor Details

#initialize(client:, domain:) ⇒ Migrate

Returns a new instance of Migrate.



5
6
7
8
9
10
11
# File 'lib/migrate.rb', line 5

def initialize(client:, domain:)
  @client           = client
  @unchanged_tables = []
  @new_tables       = []
  @domain           = domain
  load(@domain.spec_path)
end

Instance Method Details

#callObject



13
14
15
16
# File 'lib/migrate.rb', line 13

def call
  create_tables
  self
end

#resultObject



18
19
20
# File 'lib/migrate.rb', line 18

def result
  { unchanged_tables: @unchanged_tables, new_tables: @new_tables }
end