Folders: Switch order of the columns in folder table indexes so that org_id becomes first (#82454)
* Folders: Switch order of the columns in folder table so that org_id becomes first
This commit is contained in:
@@ -38,6 +38,7 @@ func (b *Builder) ToSQL(limit, page int64) (string, []any) {
|
||||
b.sql.WriteString("\n")
|
||||
|
||||
if b.Features.IsEnabledGlobally(featuremgmt.FlagNestedFolders) {
|
||||
// covered by UQE_folder_org_id_uid
|
||||
b.sql.WriteString(
|
||||
`LEFT OUTER JOIN folder ON folder.uid = dashboard.folder_uid AND folder.org_id = dashboard.org_id`)
|
||||
} else {
|
||||
|
||||
@@ -180,6 +180,7 @@ func TestBuilder_RBAC(t *testing.T) {
|
||||
},
|
||||
features: featuremgmt.WithFeatures(featuremgmt.FlagNestedFolders),
|
||||
expectedParams: []any{
|
||||
int64(1),
|
||||
int64(1),
|
||||
int64(1),
|
||||
0,
|
||||
@@ -191,6 +192,7 @@ func TestBuilder_RBAC(t *testing.T) {
|
||||
2,
|
||||
int64(1),
|
||||
int64(1),
|
||||
int64(1),
|
||||
0,
|
||||
"Viewer",
|
||||
int64(1),
|
||||
@@ -255,6 +257,7 @@ func TestBuilder_RBAC(t *testing.T) {
|
||||
},
|
||||
features: featuremgmt.WithFeatures(featuremgmt.FlagNestedFolders, featuremgmt.FlagPermissionsFilterRemoveSubquery),
|
||||
expectedParams: []any{
|
||||
int64(1),
|
||||
int64(1),
|
||||
int64(1),
|
||||
0,
|
||||
@@ -266,6 +269,7 @@ func TestBuilder_RBAC(t *testing.T) {
|
||||
2,
|
||||
int64(1),
|
||||
int64(1),
|
||||
int64(1),
|
||||
0,
|
||||
"Viewer",
|
||||
int64(1),
|
||||
|
||||
Reference in New Issue
Block a user