diff --git a/server/channels/store/sqlstore/store.go b/server/channels/store/sqlstore/store.go index f46fb3693a..2b0c831fc1 100644 --- a/server/channels/store/sqlstore/store.go +++ b/server/channels/store/sqlstore/store.go @@ -52,7 +52,8 @@ const ( // 9.6.3 would be 90603. minimumRequiredPostgresVersion = 110000 // major*1000 + minor*100 + patch - minimumRequiredMySQLVersion = 5712 + minimumRequiredMySQLVersion = 5712 + minimumRecommendedMySQLVersion = 8000 migrationsDirectionUp migrationDirection = "up" migrationsDirectionDown migrationDirection = "down" @@ -1231,8 +1232,11 @@ func (ss *SqlStore) ensureMinimumDBVersion(ver string) (bool, error) { return false, fmt.Errorf("cannot parse MySQL DB version: %w", err2) } intVer := majorVer*1000 + minorVer*100 + patchVer + if intVer < minimumRecommendedMySQLVersion { + mlog.Warn("The MySQL version being used is EOL. Please upgrade to a later version.", mlog.Int("current_version", intVer), mlog.Int("minimum_recommended_version", minimumRecommendedMySQLVersion)) + } if intVer < minimumRequiredMySQLVersion { - return false, fmt.Errorf("minimum MySQL version requirements not met. Found: %s, Wanted: %s", versionString(intVer, *ss.settings.DriverName), versionString(minimumRequiredMySQLVersion, *ss.settings.DriverName)) + return false, fmt.Errorf("Minimum MySQL version requirements not met. Found: %s, Wanted: %s", versionString(intVer, *ss.settings.DriverName), versionString(minimumRequiredMySQLVersion, *ss.settings.DriverName)) } } return true, nil diff --git a/server/channels/store/sqlstore/store_test.go b/server/channels/store/sqlstore/store_test.go index e074dd19b4..8cd45490be 100644 --- a/server/channels/store/sqlstore/store_test.go +++ b/server/channels/store/sqlstore/store_test.go @@ -489,7 +489,7 @@ func TestEnsureMinimumDBVersion(t *testing.T) { driver: model.DatabaseDriverMysql, ver: "5.6.99-test", ok: false, - err: "minimum MySQL version requirements not met", + err: "Minimum MySQL version requirements not met", }, { driver: model.DatabaseDriverMysql,