2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-10-03 17:21:20 +08:00
discourse/db/migrate/20140910130155_create_topic_user_index.rb
2023-01-09 11:59:41 +00:00

8 lines
236 B
Ruby

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