diff --git a/models/models.go b/models/models.go index 05cafccd14cd..6c92e8d6577a 100644 --- a/models/models.go +++ b/models/models.go @@ -319,7 +319,7 @@ func DumpDatabase(filePath, dbType string) error { ID int64 `xorm:"pk autoincr"` Version int64 } - t, err := x.TableInfo(Version{}) + t, err := x.TableInfo(&Version{}) if err != nil { return err } diff --git a/models/models_test.go b/models/models_test.go index 2441ad7fb064..9793394e0b6f 100644 --- a/models/models_test.go +++ b/models/models_test.go @@ -25,7 +25,7 @@ func TestDumpDatabase(t *testing.T) { ID int64 `xorm:"pk autoincr"` Version int64 } - assert.NoError(t, x.Sync2(Version{})) + assert.NoError(t, x.Sync2(new(Version))) for _, dbName := range setting.SupportedDatabases { dbType := setting.GetDBTypeByName(dbName)