Skip to content

Commit

Permalink
Merge pull request #1065 from France-ioi/fixSlowPermissionsPropagatio…
Browse files Browse the repository at this point in the history
…nQuery

Add index to sleed up permissions propagation
  • Loading branch information
smadbe authored May 8, 2024
2 parents a5b3c35 + 11558ab commit 7e565bc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions db/migrations/2405061508_add_index_permissions_propagate.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- +migrate Up
ALTER TABLE `permissions_propagate`
ADD INDEX `propagate_to_group_id_item_id`
(`propagate_to`,`group_id`,`item_id`)
;

ALTER TABLE `permissions_propagate`
DROP INDEX `propagate_to`;

-- +migrate Down
ALTER TABLE `permissions_propagate`
DROP INDEX `propagate_to_group_id_item_id`;

ALTER TABLE `permissions_propagate`
ADD INDEX `propagate_to`
(`propagate_to`)
;

0 comments on commit 7e565bc

Please sign in to comment.