Files
lotherk 1b490485ff refactor: import Gotea from Gitea v28.4.0
Rename the main module to gotea.dev and the binary to gotea, and update the application name and English locale. Keep the external gitea.dev/sdk and gitea.dev/actionslib module imports unchanged.

Assisted-by: OpenCode:DeepSeek-V4.1-Flash
2026-11-22 12:13:09 +00:00

24 lines
542 B
Go

// Copyright 2025 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package versioned_migration
import (
"context"
"gotea.dev/modelmigration"
"gotea.dev/models/db"
"gotea.dev/modules/globallock"
)
func Migrate(ctx context.Context, x db.EngineMigration) error {
// only one instance can do the migration at the same time if there are multiple instances
release, err := globallock.Lock(ctx, "gitea_versioned_migration")
if err != nil {
return err
}
defer release()
return modelmigration.Migrate(ctx, x)
}