- migration 004: create user_style_posts with user_id, platform, post_id, post_text, created_at - queries: UpsertStylePosts, DeleteStylePosts (excludes Twitter), GetStylePosts, GetStylePostsByIDs, GetStylePostByID, PruneStylePosts - activitypub: add ID field to Post struct - server: fetchProfilePosts checks cache first, upserts on miss; buildStyleProfile deletes non-Twitter posts before rebuild; background pruner runs daily
3 lines
No EOL
132 B
SQL
3 lines
No EOL
132 B
SQL
-- name: PruneStylePosts :exec
|
|
DELETE FROM user_style_posts
|
|
WHERE created_at < now() - interval '7 days' AND platform != 'Twitter'; |