[MM-45444] Denormalize Reactions to add ChannelId for top reactions insights query (#20572)
* Denormalize Reactions to add ChannelId for top reactions insights query * Remove hardcoded timestamps * Fix store, api4 tests for reactions * Fix tests * Fix integrity tests, allow reaction to have ChannelId populated before calling store function * Lint fixes * Add ChannelId field to BulkGetForPosts, Delete store handlers * Add index to mysql migration, add not null characteristic without a separate command * Select channelId instead of fetching post via store.GetPost, add if exists to drop column * Make updating of Reactions conditional to support pre-migration Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7bbf30d6bc
Коммит
20d690b412
@@ -0,0 +1 @@
|
||||
ALTER TABLE reactions DROP COLUMN IF EXISTS channelid;
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE reactions ADD COLUMN IF NOT EXISTS channelid varchar(26) NOT NULL DEFAULT '';
|
||||
UPDATE reactions SET channelid = (select channelid from posts where posts.id = reactions.postid) WHERE channelid='';
|
||||
CREATE INDEX IF NOT EXISTS idx_reactions_channel_id on reactions (channelid);
|
||||
Ссылка в новой задаче
Block a user