mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Update xorm and dependencies vendor for feature to dump to other database (#565)
* update xorm and dependencies vendor for feature to dump to other database * fix golint
This commit is contained in:
parent
70900bd167
commit
980dd0bf51
54 changed files with 3135 additions and 2619 deletions
|
@ -319,7 +319,14 @@ func Ping() error {
|
|||
return x.Ping()
|
||||
}
|
||||
|
||||
// DumpDatabase dumps all data from database to file system.
|
||||
func DumpDatabase(filePath string) error {
|
||||
return x.DumpAllToFile(filePath)
|
||||
// DumpDatabase dumps all data from database according the special database SQL syntax to file system.
|
||||
func DumpDatabase(filePath string, dbType string) error {
|
||||
var tbs []*core.Table
|
||||
for _, t := range tables {
|
||||
tbs = append(tbs, x.TableInfo(t).Table)
|
||||
}
|
||||
if len(dbType) > 0 {
|
||||
return x.DumpTablesToFile(tbs, filePath, core.DbType(dbType))
|
||||
}
|
||||
return x.DumpTablesToFile(tbs, filePath)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue