Sha256: 5a98279712fafd223408add4eb48fd07a7344e1d9b6291eb748de2dd2cd0e942

Contents?: true

Size: 206 Bytes

Versions: 6

Compression:

Stored size: 206 Bytes

Contents

class AddUniqueIndexToCounterValues < ActiveRecord::Migration[6.1]
  def change
    add_index :counter_values, [:parent_type, :parent_id, :name],
      unique: true, name: "unique_counter_values"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
counterwise-0.1.5 db/migrate/20210731224504_add_unique_index_to_counter_values.rb
counterwise-0.1.4 db/migrate/20210731224504_add_unique_index_to_counter_values.rb
counterwise-0.1.3 db/migrate/20210731224504_add_unique_index_to_counter_values.rb
counterwise-0.1.2 db/migrate/20210731224504_add_unique_index_to_counter_values.rb
counterwise-0.1.1 db/migrate/20210731224504_add_unique_index_to_counter_values.rb
counterwise-0.1.0 db/migrate/20210731224504_add_unique_index_to_counter_values.rb