[CHORE] Remove Microsoft SQL Server Support

- Per https://codeberg.org/forgejo/discussions/issues/122
This commit is contained in:
Gusted 2024-04-04 18:02:24 +02:00
parent af47c583b4
commit 2d9afd0c21
No known key found for this signature in database
GPG key ID: FD821B732837125F
70 changed files with 70 additions and 789 deletions

View file

@ -64,16 +64,11 @@ func RenameCredentialIDBytes(x *xorm.Engine) error {
}
}
switch {
case setting.Database.Type.IsMySQL():
if setting.Database.Type.IsMySQL() {
if _, err := sess.Exec("ALTER TABLE `webauthn_credential` CHANGE credential_id_bytes credential_id VARBINARY(1024)"); err != nil {
return err
}
case setting.Database.Type.IsMSSQL():
if _, err := sess.Exec("sp_rename 'webauthn_credential.credential_id_bytes', 'credential_id', 'COLUMN'"); err != nil {
return err
}
default:
} else {
if _, err := sess.Exec("ALTER TABLE `webauthn_credential` RENAME COLUMN credential_id_bytes TO credential_id"); err != nil {
return err
}