mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00: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:
@ -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