Skip to content
Snippets Groups Projects
Verified Commit 1470e362 authored by Florian Azizian's avatar Florian Azizian
Browse files

FIX #12138 TIME 0:05 users_baskets_preferences migration for indexingBasket in secondary group

parent b03381e8
No related branches found
No related tags found
No related merge requests found
...@@ -676,6 +676,9 @@ DO $$ BEGIN ...@@ -676,6 +676,9 @@ DO $$ BEGIN
select users.id, usergroups.id, user_baskets_secondary.basket_id, TRUE from users, usergroups, user_baskets_secondary select users.id, usergroups.id, user_baskets_secondary.basket_id, TRUE from users, usergroups, user_baskets_secondary
where users.user_id = user_baskets_secondary.user_id and usergroups.group_id = user_baskets_secondary.group_id where users.user_id = user_baskets_secondary.user_id and usergroups.group_id = user_baskets_secondary.group_id
order by users.id; order by users.id;
INSERT INTO users_baskets_preferences (user_serial_id, group_serial_id, basket_id, display)
SELECT u.id, g.id, 'IndexingBasket', TRUE FROM users as u INNER JOIN usergroup_content AS c ON u.user_id=c.user_id INNER JOIN usergroups AS g ON g.group_id=c.group_id
WHERE (u.user_id,g.group_id) IN (SELECT user_id, group_id FROM usergroup_content WHERE primary_group = 'N');
DROP TABLE IF EXISTS user_baskets_secondary; DROP TABLE IF EXISTS user_baskets_secondary;
END IF; END IF;
END$$; END$$;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment