Sha256: 86ee0b31b2a40e465afd26881703f7fc2f0ede7e13e2f90463c4cdb9144bead8

Contents?: true

Size: 413 Bytes

Versions: 3

Compression:

Stored size: 413 Bytes

Contents

class <%= @migration_class_name %> < Dynomite::Migration
  def up
    update_table :<%= @table_name %> do |t|
      t.add_gsi(partition_key: "<%= @partition_key %>", sort_key: "<%= @sort_key || 'updated_at' %>")

      # t.remove_gsi(partition_key: "<%= @partition_key %>", sort_key: "<%= @sort_key || 'updated_at' %>")
    end
  end
end

# More examples: https://rubyonjets.com/docs/database/dynamodb/migration/

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dynomite-2.0.2 lib/dynomite/migration/templates/update_table.rb
dynomite-2.0.1 lib/dynomite/migration/templates/update_table.rb
dynomite-2.0.0 lib/dynomite/migration/templates/update_table.rb