diff --git a/pkg/api/folder_bench_test.go b/pkg/api/folder_bench_test.go index 7d06a3be7b9..3c394bf44c9 100644 --- a/pkg/api/folder_bench_test.go +++ b/pkg/api/folder_bench_test.go @@ -331,6 +331,7 @@ func setupDB(b testing.TB) benchScenario { OrgID: signedInUser.OrgID, IsFolder: false, UID: str, + FolderID: f0.ID, FolderUID: f0.UID, Slug: str, Title: str, @@ -358,6 +359,7 @@ func setupDB(b testing.TB) benchScenario { OrgID: signedInUser.OrgID, IsFolder: false, UID: str, + FolderID: f1.ID, FolderUID: f1.UID, Slug: str, Title: str, @@ -385,6 +387,7 @@ func setupDB(b testing.TB) benchScenario { OrgID: signedInUser.OrgID, IsFolder: false, UID: str, + FolderID: f1.ID, FolderUID: f2.UID, Slug: str, Title: str, @@ -492,7 +495,7 @@ func setupServer(b testing.TB, sc benchScenario, features featuremgmt.FeatureTog } type f struct { - // ID int64 `xorm:"pk autoincr 'id'"` + ID int64 `xorm:"pk autoincr 'id'"` OrgID int64 `xorm:"org_id"` UID string `xorm:"uid"` ParentUID *string `xorm:"parent_uid"` @@ -509,8 +512,8 @@ func (f *f) TableName() string { // SQL bean helper to save tags type dashboardTag struct { - ID int64 - DashboardID int64 + ID int64 `xorm:"pk autoincr 'id'"` + DashboardID int64 `xorm:"dashboard_id"` Term string } @@ -518,10 +521,10 @@ func addFolder(orgID int64, id int64, uid string, parentUID *string) (*f, *dashb now := time.Now() title := uid f := &f{ - OrgID: orgID, - UID: uid, - Title: title, - // ID: id, + OrgID: orgID, + UID: uid, + Title: title, + ID: id, Created: now, Updated: now, ParentUID: parentUID,