mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 01:15:26 +08:00
rails4 magic sauce
This commit is contained in:
@ -20,8 +20,11 @@ from
|
||||
) as X
|
||||
where calc <> p.post_number and X.id = p.id')
|
||||
|
||||
remove_index :posts, :forum_thread_id_and_post_number
|
||||
add_index :posts, [:topic_id, :post_number], unique: true
|
||||
# automagically does this
|
||||
unless rails4?
|
||||
remove_index :posts, :forum_thread_id_and_post_number
|
||||
add_index :posts, [:topic_id, :post_number], unique: true
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
|
Reference in New Issue
Block a user