mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 21:07:06 +02:00
Refactor the DB migration system slightly (#32344)
Introduce "idNumber" for each migration, and clarify the difference between the migration ID number and database version.
This commit is contained in:
1 parent
7cf611d197
commit
d70af38447
4 files changed
+342
-531
No files matched your search
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
func checkDBVersion(ctx context.Context, logger log.Logger, autofix bool) error {
|
||||
logger.Info("Expected database version: %d", migrations.ExpectedVersion())
|
||||
logger.Info("Expected database version: %d", migrations.ExpectedDBVersion())
|
||||
if err := db.InitEngineWithMigration(ctx, migrations.EnsureUpToDate); err != nil {
|
||||
if !autofix {
|
||||
logger.Critical("Error: %v during ensure up to date", err)
|
||||
|
||||
Reference in new issue
Block a user