diff options
author | Gusted <postmaster@gusted.xyz> | 2024-04-04 18:02:24 +0200 |
---|---|---|
committer | Gusted <postmaster@gusted.xyz> | 2024-04-05 23:37:36 +0200 |
commit | 2d9afd0c2194b60689717c2a9dc36284f012f7b6 (patch) | |
tree | e13a3adbe9361523f17c9d0eab77193cdae5e696 /cmd | |
parent | Merge pull request '[CHORE] Remove Gitea specific files' (#3039) from gusted/... (diff) | |
download | forgejo-2d9afd0c2194b60689717c2a9dc36284f012f7b6.tar.xz forgejo-2d9afd0c2194b60689717c2a9dc36284f012f7b6.zip |
[CHORE] Remove Microsoft SQL Server Support
- Per https://codeberg.org/forgejo/discussions/issues/122
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/doctor_convert.go | 15 | ||||
-rw-r--r-- | cmd/dump.go | 2 |
2 files changed, 5 insertions, 12 deletions
diff --git a/cmd/doctor_convert.go b/cmd/doctor_convert.go index 48c835ad0e..190b2fc2ef 100644 --- a/cmd/doctor_convert.go +++ b/cmd/doctor_convert.go @@ -17,7 +17,7 @@ import ( var cmdDoctorConvert = &cli.Command{ Name: "convert", Usage: "Convert the database", - Description: "A command to convert an existing MySQL database from utf8 to utf8mb4 or MSSQL database from varchar to nvarchar", + Description: "A command to convert an existing MySQL database from utf8 to utf8mb4", Action: runDoctorConvert, } @@ -35,21 +35,14 @@ func runDoctorConvert(ctx *cli.Context) error { log.Info("Log path: %s", setting.Log.RootPath) log.Info("Configuration file: %s", setting.CustomConf) - switch { - case setting.Database.Type.IsMySQL(): + if setting.Database.Type.IsMySQL() { if err := db.ConvertDatabaseTable(); err != nil { log.Fatal("Failed to convert database & table: %v", err) return err } fmt.Println("Converted successfully, please confirm your database's character set is now utf8mb4") - case setting.Database.Type.IsMSSQL(): - if err := db.ConvertVarcharToNVarchar(); err != nil { - log.Fatal("Failed to convert database from varchar to nvarchar: %v", err) - return err - } - fmt.Println("Converted successfully, please confirm your database's all columns character is NVARCHAR now") - default: - fmt.Println("This command can only be used with a MySQL or MSSQL database") + } else { + fmt.Println("This command can only be used with a MySQL database") } return nil diff --git a/cmd/dump.go b/cmd/dump.go index 3ea92aa112..0a18adb27d 100644 --- a/cmd/dump.go +++ b/cmd/dump.go @@ -128,7 +128,7 @@ It can be used for backup and capture Forgejo server image to send to maintainer &cli.StringFlag{ Name: "database", Aliases: []string{"d"}, - Usage: "Specify the database SQL syntax: sqlite3, mysql, mssql, postgres", + Usage: "Specify the database SQL syntax: sqlite3, mysql, postgres", }, &cli.BoolFlag{ Name: "skip-repository", |