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

* gitea dump: include version

* Check InstallLock
This commit is contained in:
6543 authored and GitHub committed 2020-09-07 20:44:45 -04:00
1 parent dc71d00393
commit 7a25441abe
3 files changed
+21

No files matched your search

+11
View File
@@ -264,6 +264,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))
}