Commit Graph

1 Commits (9c2212df15f61c8d7929f4c24ff1beedfff6f728)

Author SHA1 Message Date
zeripath 3fd060eb37
Include OriginalAuthor in Reaction constraint ()
When migrating repositories with reactions with deleted users, the original
author id may be -1. This means that it is possible to end up attempting
to create multiple reactions with the same [ Type, IssueID, CommentID, UserID,
OriginalAuthorID ] thus breaking the constraints.

On SQLite this appears to cause a deadlock but on other dbs this will
cause the migration to fail.

This PR extends the constraint to include the original author username
in the constraint.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>