mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-23 13:26:22 -04:00
FIX: handle deferred and disagreed post actions
This commit is contained in:
parent
7e5678abd5
commit
c0b6e399d8
1 changed files with 11 additions and 0 deletions
11
db/migrate/20140815191556_fix_post_actions_index_again.rb
Normal file
11
db/migrate/20140815191556_fix_post_actions_index_again.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class FixPostActionsIndexAgain < ActiveRecord::Migration
|
||||
def change
|
||||
remove_index "post_actions", name: "idx_unique_actions"
|
||||
add_index "post_actions",
|
||||
["user_id", "post_action_type_id",
|
||||
"post_id", "targets_topic"],
|
||||
name: "idx_unique_actions",
|
||||
unique: true,
|
||||
where: 'deleted_at IS NULL AND disagreed_at IS NULL AND deferred_at IS NULL'
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue