mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-22 17:34:03 +03:00
fix table name typo on SQL (#5562)
* fix table name typo on SQL * fix reserved word user when on mssql
This commit is contained in:
parent
b65e37ed72
commit
9d0dee88d2
@ -11,7 +11,7 @@ import (
|
|||||||
|
|
||||||
func clearNonusedData(x *xorm.Engine) error {
|
func clearNonusedData(x *xorm.Engine) error {
|
||||||
condDelete := func(colName string) builder.Cond {
|
condDelete := func(colName string) builder.Cond {
|
||||||
return builder.NotIn(colName, builder.Select("id").From("user"))
|
return builder.NotIn(colName, builder.Select("id").From("`user`"))
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err := x.Exec(builder.Delete(condDelete("uid")).From("team_user")); err != nil {
|
if _, err := x.Exec(builder.Delete(condDelete("uid")).From("team_user")); err != nil {
|
||||||
@ -22,7 +22,7 @@ func clearNonusedData(x *xorm.Engine) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err := x.Exec(builder.Delete(condDelete("user_id")).From("stop_watch")); err != nil {
|
if _, err := x.Exec(builder.Delete(condDelete("user_id")).From("stopwatch")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user