aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/models.go2
-rw-r--r--models/models_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/models/models.go b/models/models.go
index 73e65d828b..b0a9062566 100644
--- a/models/models.go
+++ b/models/models.go
@@ -320,7 +320,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 2441ad7fb0..9793394e0b 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)