1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2024-12-28 23:04:52 +09:00

DB: Remove the "manual" fields from follow records

Follows used to be added automatically, without a Follow activity sent by the
client. They aren't added automatically anymore, so there's no need for those
"manual" boolean fields.
This commit is contained in:
fr33domlover 2019-10-22 10:25:33 +00:00
parent 9ec4142737
commit 0673ed0bb4
4 changed files with 6 additions and 4 deletions

View file

@ -176,7 +176,6 @@ FollowerSet
Follow Follow
person PersonId person PersonId
target FollowerSetId target FollowerSetId
manual Bool
public Bool public Bool
follow OutboxItemId follow OutboxItemId
accept OutboxItemId accept OutboxItemId
@ -188,7 +187,6 @@ Follow
RemoteFollow RemoteFollow
actor RemoteActorId actor RemoteActorId
target FollowerSetId target FollowerSetId
manual Bool
public Bool public Bool
follow RemoteActivityId follow RemoteActivityId
accept OutboxItemId accept OutboxItemId

View file

@ -576,7 +576,7 @@ followC shrUser summary audience follow@(AP.Follow uObject muContext hide) = run
return (obiid, doc, luAct) return (obiid, doc, luAct)
deliverFollowLocal pidAuthor fsid unread obiidF obiidA ibidRecip = do deliverFollowLocal pidAuthor fsid unread obiidF obiidA ibidRecip = do
insert_ $ Follow pidAuthor fsid True (not hide) obiidF obiidA insert_ $ Follow pidAuthor fsid (not hide) obiidF obiidA
ibiid <- insert $ InboxItem unread ibiid <- insert $ InboxItem unread
insert_ $ InboxItemLocal ibidRecip obiidF ibiid insert_ $ InboxItemLocal ibidRecip obiidF ibiid

View file

@ -283,7 +283,7 @@ followF
insertFollow ractid obiidA fsid = do insertFollow ractid obiidA fsid = do
let raid = remoteAuthorId author let raid = remoteAuthorId author
mrfid <- insertUnique $ RemoteFollow raid fsid True (not hide) ractid obiidA mrfid <- insertUnique $ RemoteFollow raid fsid (not hide) ractid obiidA
return $ isJust mrfid return $ isJust mrfid
insertAcceptToOutbox ra luFollow obidRecip = do insertAcceptToOutbox ra luFollow obidRecip = do

View file

@ -1087,6 +1087,10 @@ changes hLocal ctx =
, addFieldRefRequiredEmpty "RemoteFollow" "accept" "OutboxItem" , addFieldRefRequiredEmpty "RemoteFollow" "accept" "OutboxItem"
-- 148 -- 148
, addUnique "RemoteFollow" $ Unique "UniqueRemoteFollowAccept" ["accept"] , addUnique "RemoteFollow" $ Unique "UniqueRemoteFollowAccept" ["accept"]
-- 149
, removeField "Follow" "manual"
-- 150
, removeField "RemoteFollow" "manual"
] ]
migrateDB migrateDB