2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-05-21 14:36:06 -04:00
|
|
|
class ChangeIndexesTopicViewItem < ActiveRecord::Migration[5.1]
|
|
|
|
def up
|
|
|
|
remove_index :topic_views,
|
|
|
|
column: %i[ip_address topic_id],
|
|
|
|
name: :ip_address_topic_id_topic_views,
|
|
|
|
unique: true
|
2018-07-16 11:45:18 -04:00
|
|
|
|
2018-05-21 14:36:06 -04:00
|
|
|
remove_index :topic_views,
|
|
|
|
column: %i[user_id topic_id],
|
|
|
|
name: :user_id_topic_id_topic_views,
|
|
|
|
unique: true
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
end
|
|
|
|
end
|