diff --git a/config/models b/config/models index dca8432..553ea5c 100644 --- a/config/models +++ b/config/models @@ -375,18 +375,18 @@ TicketProjectLocal TicketAuthorLocal ticket LocalTicketId author PersonId - offer OutboxItemId + open OutboxItemId - UniqueTicketAuthorLocal ticket - UniqueTicketAuthorLocalOffer offer + UniqueTicketAuthorLocal ticket + UniqueTicketAuthorLocalOpen open TicketAuthorRemote ticket TicketProjectLocalId author RemoteActorId - offer RemoteActivityId + open RemoteActivityId - UniqueTicketAuthorRemote ticket - UniqueTicketAuthorRemoteOffer offer + UniqueTicketAuthorRemote ticket + UniqueTicketAuthorRemoteOpen open TicketDependency parent TicketId diff --git a/src/Vervis/API.hs b/src/Vervis/API.hs index cc0c529..625c767 100644 --- a/src/Vervis/API.hs +++ b/src/Vervis/API.hs @@ -877,7 +877,7 @@ offerTicketC shrUser summary audience offer@(Offer ticket uTarget) = runExceptT insert_ TicketAuthorLocal { ticketAuthorLocalTicket = ltid , ticketAuthorLocalAuthor = pidAuthor - , ticketAuthorLocalOffer = obiid + , ticketAuthorLocalOpen = obiid } --insertMany_ $ map (TicketDependency tid) tidsDeps -- insert_ $ Follow pidAuthor fsid False True diff --git a/src/Vervis/Federation/Ticket.hs b/src/Vervis/Federation/Ticket.hs index 3ffb384..471f098 100644 --- a/src/Vervis/Federation/Ticket.hs +++ b/src/Vervis/Federation/Ticket.hs @@ -286,7 +286,7 @@ projectOfferTicketF insert_ TicketAuthorRemote { ticketAuthorRemoteTicket = tplid , ticketAuthorRemoteAuthor = raidAuthor - , ticketAuthorRemoteOffer = ractid + , ticketAuthorRemoteOpen = ractid } docAccept <- insertAccept ra luOffer ltid obiidAccept -- insertMany_ $ map (TicketDependency tid) deps diff --git a/src/Vervis/Handler/Client.hs b/src/Vervis/Handler/Client.hs index 0b4c04c..71eacc9 100644 --- a/src/Vervis/Handler/Client.hs +++ b/src/Vervis/Handler/Client.hs @@ -694,7 +694,7 @@ postTicketsR shr prj = do ExceptT $ offerTicket shrAuthor (TextHtml title) (TextPandocMarkdown desc) shr prj obiid <- ExceptT $ offerTicketC shrAuthor summary audience offer ExceptT $ runDB $ do - mtal <- getValBy $ UniqueTicketAuthorLocalOffer obiid + mtal <- getValBy $ UniqueTicketAuthorLocalOpen obiid return $ case mtal of Nothing -> diff --git a/src/Vervis/Migration.hs b/src/Vervis/Migration.hs index 7f913c5..6fbf81b 100644 --- a/src/Vervis/Migration.hs +++ b/src/Vervis/Migration.hs @@ -1407,6 +1407,20 @@ changes hLocal ctx = "UniqueTicketAuthorRemote" -- 210 , renameField "TicketAuthorRemote" "ticketNew" "ticket" + -- 211 + , renameField "TicketAuthorLocal" "offer" "open" + -- 212 + , renameUnique + "TicketAuthorLocal" + "UniqueTicketAuthorLocaleOffer" + "UniqueTicketAuthorLocalOpen" + -- 213 + , renameField "TicketAuthorRemote" "offer" "open" + -- 214 + , renameUnique + "TicketAuthorRemote" + "UniqueTicketAuthorRemoteOffer" + "UniqueTicketAuthorRemoteOpen" ] migrateDB