mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: drafts are unique by draft_key and user_id
Previously our index was non unique, causing situations where a user could have multiple drafts stored in the table for the same exact entity. This does not properly reflect reality and needed to change as in certain cases duplicate drafts could be created causing internal data inconsistency
This commit is contained in:
@@ -282,5 +282,5 @@ end
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_drafts_on_user_id_and_draft_key (user_id,draft_key)
|
||||
# index_drafts_on_user_id_and_draft_key (user_id,draft_key) UNIQUE
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user