diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2018-12-19 20:58:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-19 20:58:46 +0800 |
commit | 9d0dee88d263dd0f70eeb4582a2472f2287db181 (patch) | |
tree | 1ae4876053488f5cf1625e95285aaf03c07a14e3 /models/migrations/v75.go | |
parent | b65e37ed722da94f62c90e456413a99e6ec9f419 (diff) | |
download | gitea-9d0dee88d263dd0f70eeb4582a2472f2287db181.tar.gz gitea-9d0dee88d263dd0f70eeb4582a2472f2287db181.zip |
fix table name typo on SQL (#5562)
* fix table name typo on SQL
* fix reserved word user when on mssql
Diffstat (limited to 'models/migrations/v75.go')
-rw-r--r-- | models/migrations/v75.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/migrations/v75.go b/models/migrations/v75.go index d1ea5fcc94..62f92b77db 100644 --- a/models/migrations/v75.go +++ b/models/migrations/v75.go @@ -11,7 +11,7 @@ import ( func clearNonusedData(x *xorm.Engine) error { 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 { @@ -22,7 +22,7 @@ func clearNonusedData(x *xorm.Engine) error { 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 } |