From c65b9e0112afb2a499dcdba10e70c6f1b74052c3 Mon Sep 17 00:00:00 2001 From: Gusted Date: Thu, 4 Apr 2024 22:27:56 +0200 Subject: [PATCH] Mark depreciation of MSSQL - Per https://codeberg.org/forgejo/discussions/issues/122 --- modules/setting/database.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/setting/database.go b/modules/setting/database.go index 47d79d0de9..7433896455 100644 --- a/modules/setting/database.go +++ b/modules/setting/database.go @@ -12,6 +12,8 @@ import ( "path/filepath" "strings" "time" + + "code.gitea.io/gitea/modules/log" ) var ( @@ -62,6 +64,11 @@ func loadDBSetting(rootCfg ConfigProvider) { sec := rootCfg.Section("database") Database.Type = DatabaseType(sec.Key("DB_TYPE").String()) + if Database.Type.IsMSSQL() { + log.Error("Your Forgejo instance uses Microsoft SQL Server as its database which is scheduled for removal in v8.0. Please file an issue https://codeberg.org/forgejo/forgejo/issues/new to get help migrating to another database. Waiting 60 seconds before starting Forgejo") + time.Sleep(time.Second * 60) + } + Database.Host = sec.Key("HOST").String() Database.Name = sec.Key("NAME").String() Database.User = sec.Key("USER").String()