post events: show post-related mod actions on post event page.
Show the following actions on the post events page: * Post bans and unbans * Post deletions and undeletions * Thumbnail regenerations and IQDB regenerations * Favorites moves * Rating locks and unlocks * Note locks and unlocks Fixes #3825: Events/Moderation page for each post should show eventual ban actions
This commit is contained in:
23
db/views/post_events_v02.sql
Normal file
23
db/views/post_events_v02.sql
Normal file
@@ -0,0 +1,23 @@
|
||||
SELECT 'Post'::character varying AS model_type, id AS model_id, id AS post_id, uploader_id AS creator_id, created_at AS event_at
|
||||
FROM posts
|
||||
UNION ALL
|
||||
SELECT 'PostAppeal'::character varying, id, post_id, creator_id, created_at
|
||||
FROM post_appeals
|
||||
UNION ALL
|
||||
SELECT 'PostApproval'::character varying, id, post_id, user_id, created_at
|
||||
FROM post_approvals
|
||||
UNION ALL
|
||||
SELECT 'PostDisapproval'::character varying, id, post_id, user_id, created_at
|
||||
FROM post_disapprovals
|
||||
UNION ALL
|
||||
SELECT 'PostFlag'::character varying, id, post_id, creator_id, created_at
|
||||
FROM post_flags
|
||||
UNION ALL
|
||||
SELECT 'PostReplacement'::character varying, id, post_id, creator_id, created_at
|
||||
FROM post_replacements
|
||||
UNION ALL (
|
||||
SELECT 'ModAction'::character varying, id, subject_id, creator_id, created_at
|
||||
FROM mod_actions
|
||||
WHERE mod_actions.subject_type = 'Post'
|
||||
ORDER BY created_at DESC
|
||||
)
|
||||
Reference in New Issue
Block a user