mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add index on topic_links post_id. Remove a redundant index.
This commit is contained in:
parent
f9e80e1eb2
commit
5f94c29ada
@ -0,0 +1,13 @@
|
|||||||
|
class AddAndRemoveIndexesOnTopicLinks < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
# Index (topic_id) is a subset of (topic_id, post_id, url)
|
||||||
|
remove_index :topic_links, :topic_id
|
||||||
|
|
||||||
|
add_index :topic_links, :post_id
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_index :topic_links, :post_id
|
||||||
|
add_index :topic_links, :topic_id
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user