comments: add uniqueness constraint on votes.

This commit is contained in:
evazion
2021-01-23 14:44:11 -06:00
parent 5061b0a013
commit b689c9cbed
3 changed files with 26 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
class AddUniqueUserIdIndexToCommentVotes < ActiveRecord::Migration[6.1]
def change
add_index :comment_votes, [:user_id, :comment_id], unique: true
end
end