それならわかる寄り
これ回した
2ヶ月前までの反応なしで再取得可能なリモート投稿を300件ずつ消してlogに出すやつ
DO $$
DECLARE
deleted_count INT;
total_deleted INT := 0;
BEGIN
LOOP
DELETE FROM note
WHERE id IN (
SELECT id FROM note
WHERE "createdAt" < (current_date - interval '2 months')
AND "renoteCount" = 0
AND "repliesCount" = 0
AND "reactions" = '{}'
AND ( "visibility" = 'public' OR "visibility" = 'home' )
AND "userHost" IS NOT NULL
LIMIT 300
);
GET DIAGNOSTICS deleted_count = ROW_COUNT;
EXIT WHEN deleted_count = 0;
total_deleted := total_deleted + deleted_count;
RAISE NOTICE 'Deleted % rows in total.', total_deleted;
PERFORM pg_sleep(1);
END LOOP;
END $$;
ROMとかいってるとそのまま消えるパターンが多いので気にせず書き込んでいいんですよ…! そうしてるとローカルにいる人も勝手に慣れてこういう人なんだな~になるので
This account is not set to public on notestock.
This account is not set to public on notestock.
This account is not set to public on notestock.
This account is not set to public on notestock.
$[position.x=-5,y=0 -]$[position.x=1.4,y=-1.4 ]
$[position.x=0,y=-1 かなやっぱ]