diff options
author | Jason Song <i@wolfogre.com> | 2022-12-07 23:58:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-07 09:58:31 -0600 |
commit | 0a85537c79b65f3b10a4b66265a23a8de46a2e43 (patch) | |
tree | 882703646819e463b64fec8fc436b8087ad5fd1b /modules/doctor | |
parent | e2fa84fddc80368c0315616870b8c75592397422 (diff) | |
download | gitea-0a85537c79b65f3b10a4b66265a23a8de46a2e43.tar.gz gitea-0a85537c79b65f3b10a4b66265a23a8de46a2e43.zip |
Support disabling database auto migration (#22053)
Gitea will migrate the database model version automatically, but it
should be able to be disabled and keep Gitea shutdown if the version is
not matched.
Diffstat (limited to 'modules/doctor')
-rw-r--r-- | modules/doctor/dbversion.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/doctor/dbversion.go b/modules/doctor/dbversion.go index 3ddca92fb3..2b20cb2340 100644 --- a/modules/doctor/dbversion.go +++ b/modules/doctor/dbversion.go @@ -12,6 +12,7 @@ import ( ) func checkDBVersion(ctx context.Context, logger log.Logger, autofix bool) error { + logger.Info("Expected database version: %d", migrations.ExpectedVersion()) if err := db.InitEngineWithMigration(ctx, migrations.EnsureUpToDate); err != nil { if !autofix { logger.Critical("Error: %v during ensure up to date", err) |