sql: Add indices by key and key+value for user metas projection

This commit is contained in:
Marco Ardizzone
2025-08-08 10:46:47 +02:00
parent 4a88d73c6b
commit c4fa9a0975

View File

@@ -49,6 +49,9 @@ func (*userMetadataProjection) Init() *old_handler.Check {
},
handler.NewPrimaryKey(UserMetadataColumnInstanceID, UserMetadataColumnUserID, UserMetadataColumnKey),
handler.WithIndex(handler.NewIndex("resource_owner", []string{UserGrantResourceOwner})),
handler.WithIndex(handler.NewIndex("metadata_key", []string{UserMetadataColumnKey})),
handler.WithIndex(handler.NewIndex("metadata_value", []string{UserMetadataColumnValue})),
handler.WithIndex(handler.NewIndex("metadata_key_and_value", []string{UserMetadataColumnKey, UserMetadataColumnValue})),
),
)
}