Class: CreateSchemaMigrations
Instance Method Summary
collapse
#add_gsi, #create_table, #delete_table, #remove_gsi, #update_gsi, #update_table, #update_time_to_live
#table_name_with_namespace
#waiter
Instance Method Details
#table_exist?(full_table_name) ⇒ Boolean
11
12
13
14
15
16
|
# File 'lib/dynomite/migration/internal/migrate/create_schema_migrations.rb', line 11
def table_exist?(full_table_name)
client.describe_table(table_name: full_table_name)
true
rescue Aws::DynamoDB::Errors::ResourceNotFoundException
false
end
|
#up ⇒ Object
4
5
6
7
8
9
|
# File 'lib/dynomite/migration/internal/migrate/create_schema_migrations.rb', line 4
def up
create_table :schema_migrations do |t|
t.partition_key "version:number" t.billing_mode "PAY_PER_REQUEST"
end
end
|