1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-03 00:45:22 +02:00

gitea dump: include version & Check InstallLock (#12760)

* gitea dump: include version

* Check InstallLock (close #12759)

* fix test

* fix lint
This commit is contained in:
6543 2020-09-08 00:27:17 +02:00 committed by GitHub
parent 226aef7e0f
commit cfd8e8a489
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 0 deletions

View file

@ -302,6 +302,17 @@ func DumpDatabase(filePath string, dbType string) error {
}
tbs = append(tbs, t)
}
type Version struct {
ID int64 `xorm:"pk autoincr"`
Version int64
}
t, err := x.TableInfo(Version{})
if err != nil {
return err
}
tbs = append(tbs, t)
if len(dbType) > 0 {
return x.DumpTablesToFile(tbs, filePath, schemas.DBType(dbType))
}