aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/db/migration/V1.27__followers_unique.sql
blob: 5a15d9aef335d2bfc9a7ed823b1e9171dbd61f15 (plain) (blame)
1
2
3
4
DELETE
FROM followers A USING followers B
WHERE A.user_id=B.user_id AND A.ts<=B.ts AND A.acct=B.acct AND A.ctid<B.ctid;
ALTER TABLE followers ADD UNIQUE (user_id, acct)