Sha256: cf0e9a5f85875338321fcdc6357b8fcd6fc388bbad3c3e016c62f5c92c1057ad
Contents?: true
Size: 496 Bytes
Versions: 3
Compression:
Stored size: 496 Bytes
Contents
class <%= @migration_class_name %> < Dynomite::Migration def up create_table :<%= @table_name %> do |t| t.partition_key :<%= @partition_key %> <% if @sort_key # so extra spaces are not added when generated -%> t.sort_key "<%= @sort_key %>" # optional <% end -%> <% if %w[id id:string].include?(@partition_key) -%> t.add_gsi :updated_at <% else %> t.add_gsi :id <% end -%> end end end # More examples: https://rubyonjets.com/docs/database/dynamodb/migration/
Version data entries
3 entries across 3 versions & 1 rubygems