Skip to content
Snippets Groups Projects
Commit 9e126e9d authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Merge branch 'mt-mentions-fix' into 'develop'

mentions fix

See merge request !314
parents 10d70b96 f92eac4d
No related branches found
No related tags found
2 merge requests!456Release candidate v1 24,!314mentions fix
......@@ -6,18 +6,13 @@ LANGUAGE 'plpgsql'
AS
$function$
DECLARE
__head_block_time TIMESTAMP;
__90_days_beyond_head_block_number INTEGER;
BEGIN
__head_block_time = head_block_time();
__90_days_beyond_head_block_number = block_before_head('90 days'::interval);
DELETE FROM hive_mentions hm
WHERE post_id in
(
SELECT id
FROM hive_posts
WHERE created_at < ( __head_block_time - '90 days'::interval )
);
DELETE FROM hive_mentions
WHERE block_num < __90_days_beyond_head_block_number;
END
$function$
......
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