mirror of https://github.com/go-gitea/gitea.git
error when version missing
This commit is contained in:
parent
17e9d32405
commit
6c057fec6e
|
@ -270,14 +270,8 @@ func MigrateToXormigrate(x *xorm.Engine) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("get: %w", err)
|
return fmt.Errorf("get: %w", err)
|
||||||
} else if !has {
|
} else if !has {
|
||||||
// If the version record does not exist we think
|
// This should not happen
|
||||||
// it is a fresh installation and we can skip all migrations.
|
return fmt.Errorf("could not get version", err)
|
||||||
currentVersion.ID = 0
|
|
||||||
currentVersion.Version = expectedVersion
|
|
||||||
|
|
||||||
if _, err = x.InsertOne(currentVersion); err != nil {
|
|
||||||
return fmt.Errorf("insert: %w", err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
v := currentVersion.Version
|
v := currentVersion.Version
|
||||||
|
|
Loading…
Reference in New Issue