1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-09 17:24:43 +00:00
zeripath 3fd060eb37
Include OriginalAuthor in Reaction constraint (#13505)
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 #13271

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-11-10 22:37:11 +00:00
..
2020-03-22 11:12:55 -04:00
2020-04-05 07:20:50 +01:00
2020-06-15 16:46:01 -04:00
2017-05-04 13:54:56 +08:00
2020-10-20 14:18:25 -04:00
2020-04-05 07:20:50 +01:00
2019-12-15 16:57:34 -05:00
2020-08-24 11:48:15 -04:00
2020-10-31 01:36:46 -04:00
2020-04-05 07:20:50 +01:00
2020-08-16 23:07:38 -04:00
2020-08-16 23:07:38 -04:00
2020-08-16 23:07:38 -04:00
2020-08-16 23:07:38 -04:00
2020-09-25 07:09:23 +03:00
2020-08-16 23:07:38 -04:00
2020-10-20 14:18:25 -04:00
2020-04-05 07:20:50 +01:00
2020-08-16 23:07:38 -04:00
2020-03-02 00:05:44 +02:00
2020-04-05 07:20:50 +01:00
2019-06-12 15:41:28 -04:00
2020-10-23 20:55:10 +03:00