diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index 77f2ab053..0fdaf855d 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -56,12 +56,13 @@ func expiredMigration(x *xorm.Engine) error { func prepareToCommitComments(x *xorm.Engine) error { - sql := `ALTER TABLE comment MODIFY commit_id VARCHAR(50) DEFAULT NULL` + sql := `ALTER TABLE comment MODIFY commit_id VARCHAR(50) NULL DEFAULT NULL` _, err := x.Exec(sql) if err != nil { return err } - sql = `ALTER TABLE comment MODIFY line VARCHAR(50) DEFAULT NULL;` + + sql = `ALTER TABLE comment MODIFY line VARCHAR(50) NULL DEFAULT NULL;` _, err = x.Exec(sql) if err != nil { return err diff --git a/modules/mailer/mail.go b/modules/mailer/mail.go index 004feedb8..7a345e077 100644 --- a/modules/mailer/mail.go +++ b/modules/mailer/mail.go @@ -222,6 +222,7 @@ func SendIssueMentionMail(r macaron.Render, u, owner *models.User, data := GetMailTmplData(nil) data["IssueLink"] = fmt.Sprintf("%s/%s/issues/%d", owner.Name, repo.Name, issue.Index) data["Subject"] = subject + data["ActUserName"] = u.Name body, err := r.HTMLString(string(NOTIFY_MENTION), data) if err != nil { @@ -246,6 +247,7 @@ func SendCommentMentionMail(r macaron.Render, u, owner *models.User, data := GetMailTmplData(nil) data["IssueLink"] = fmt.Sprintf("%s/%s/commit/%s", owner.Name, repo.Name, comment.CommitId) data["Subject"] = subject + data["ActUserName"] = u.Name body, err := r.HTMLString(string(NOTIFY_MENTION), data) if err != nil {