DB: In TAL and TAR, rename 'offer' to 'open'
That's because with the Create flow added, the activity that reports a ticket can be either Create or Offer, maybe later Announce too. The old TAL unique name mentioned in the migration has what may look like a typo, "Locale" instead of "Local". That's because I made a typo in migration 115, and now needed to specify the typoed name I used then. I verified in dev DB and on dev.angeley.es DB that the typo is reflected in the PostgreSQL database side and fixed by the new migrations.
This commit is contained in:
parent
6fa0a9cb46
commit
fb9e2dd4dd
5 changed files with 23 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ->
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue