diff --git a/internal/collections/infra/mysql_repo.go b/internal/collections/infra/mysql_repo.go index b1cd567e..a408e44c 100644 --- a/internal/collections/infra/mysql_repo.go +++ b/internal/collections/infra/mysql_repo.go @@ -880,7 +880,8 @@ func (r mysqlRepo) createEpisodeCollection( } table := r.q.EpCollection - err = table.WithContext(ctx).Where(table.UserID.Eq(userID), table.SubjectID.Eq(subjectID)).Create(&dao.EpCollection{ + err = table.WithContext(ctx).Clauses(clause.OnConflict{DoNothing: true}). + Where(table.UserID.Eq(userID), table.SubjectID.Eq(subjectID)).Create(&dao.EpCollection{ UserID: userID, SubjectID: subjectID, Status: bytes,