mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
rails4 magic sauce
This commit is contained in:
parent
4fa32c4dc0
commit
a84997ebc7
2 changed files with 6 additions and 2 deletions
|
@ -517,6 +517,7 @@ DEPENDENCIES
|
||||||
qunit-rails
|
qunit-rails
|
||||||
rack-cors
|
rack-cors
|
||||||
rack-mini-profiler!
|
rack-mini-profiler!
|
||||||
|
rack-protection
|
||||||
rails!
|
rails!
|
||||||
rails-observers
|
rails-observers
|
||||||
rails_multisite!
|
rails_multisite!
|
||||||
|
|
|
@ -20,8 +20,11 @@ from
|
||||||
) as X
|
) as X
|
||||||
where calc <> p.post_number and X.id = p.id')
|
where calc <> p.post_number and X.id = p.id')
|
||||||
|
|
||||||
remove_index :posts, :forum_thread_id_and_post_number
|
# automagically does this
|
||||||
add_index :posts, [:topic_id, :post_number], unique: true
|
unless rails4?
|
||||||
|
remove_index :posts, :forum_thread_id_and_post_number
|
||||||
|
add_index :posts, [:topic_id, :post_number], unique: true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
|
|
Loading…
Reference in a new issue