Skip to content

Commit 230f328

Browse files
committed
gitea dump: include version
1 parent 226aef7 commit 230f328

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

models/models.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,17 @@ func DumpDatabase(filePath string, dbType string) error {
302302
}
303303
tbs = append(tbs, t)
304304
}
305+
306+
type Version struct {
307+
ID int64 `xorm:"pk autoincr"`
308+
Version int64
309+
}
310+
t, err := x.TableInfo(Version{})
311+
if err != nil {
312+
return err
313+
}
314+
tbs = append(tbs, t)
315+
305316
if len(dbType) > 0 {
306317
return x.DumpTablesToFile(tbs, filePath, schemas.DBType(dbType))
307318
}

0 commit comments

Comments
 (0)