forked from forgejo/forgejo
[CHORE] Remove Microsoft SQL Server Support
- Per https://codeberg.org/forgejo/discussions/issues/122
This commit is contained in:
parent
af47c583b4
commit
2d9afd0c21
70 changed files with 70 additions and 789 deletions
|
@ -32,13 +32,7 @@ func ConvertHookTaskTypeToVarcharAndTrim(x *xorm.Engine) error {
|
|||
return err
|
||||
}
|
||||
|
||||
var hookTaskTrimSQL string
|
||||
if dbType == schemas.MSSQL {
|
||||
hookTaskTrimSQL = "UPDATE hook_task SET typ = RTRIM(LTRIM(typ))"
|
||||
} else {
|
||||
hookTaskTrimSQL = "UPDATE hook_task SET typ = TRIM(typ)"
|
||||
}
|
||||
if _, err := x.Exec(hookTaskTrimSQL); err != nil {
|
||||
if _, err := x.Exec("UPDATE hook_task SET typ = TRIM(typ)"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -58,12 +52,6 @@ func ConvertHookTaskTypeToVarcharAndTrim(x *xorm.Engine) error {
|
|||
return err
|
||||
}
|
||||
|
||||
var webhookTrimSQL string
|
||||
if dbType == schemas.MSSQL {
|
||||
webhookTrimSQL = "UPDATE webhook SET type = RTRIM(LTRIM(type))"
|
||||
} else {
|
||||
webhookTrimSQL = "UPDATE webhook SET type = TRIM(type)"
|
||||
}
|
||||
_, err := x.Exec(webhookTrimSQL)
|
||||
_, err := x.Exec("UPDATE webhook SET type = TRIM(type)")
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue