Files
discourse/db/migrate/20140910130155_create_topic_user_index.rb
2017-09-25 13:48:58 +08:00

7 lines
206 B
Ruby

class CreateTopicUserIndex < ActiveRecord::Migration[4.2]
def change
# seems to be the most effective for joining into topics
add_index :topic_users, [:user_id, :topic_id], unique: true
end
end