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
|
TicketAuthorLocal
|
||||||
ticket LocalTicketId
|
ticket LocalTicketId
|
||||||
author PersonId
|
author PersonId
|
||||||
offer OutboxItemId
|
open OutboxItemId
|
||||||
|
|
||||||
UniqueTicketAuthorLocal ticket
|
UniqueTicketAuthorLocal ticket
|
||||||
UniqueTicketAuthorLocalOffer offer
|
UniqueTicketAuthorLocalOpen open
|
||||||
|
|
||||||
TicketAuthorRemote
|
TicketAuthorRemote
|
||||||
ticket TicketProjectLocalId
|
ticket TicketProjectLocalId
|
||||||
author RemoteActorId
|
author RemoteActorId
|
||||||
offer RemoteActivityId
|
open RemoteActivityId
|
||||||
|
|
||||||
UniqueTicketAuthorRemote ticket
|
UniqueTicketAuthorRemote ticket
|
||||||
UniqueTicketAuthorRemoteOffer offer
|
UniqueTicketAuthorRemoteOpen open
|
||||||
|
|
||||||
TicketDependency
|
TicketDependency
|
||||||
parent TicketId
|
parent TicketId
|
||||||
|
|
|
@ -877,7 +877,7 @@ offerTicketC shrUser summary audience offer@(Offer ticket uTarget) = runExceptT
|
||||||
insert_ TicketAuthorLocal
|
insert_ TicketAuthorLocal
|
||||||
{ ticketAuthorLocalTicket = ltid
|
{ ticketAuthorLocalTicket = ltid
|
||||||
, ticketAuthorLocalAuthor = pidAuthor
|
, ticketAuthorLocalAuthor = pidAuthor
|
||||||
, ticketAuthorLocalOffer = obiid
|
, ticketAuthorLocalOpen = obiid
|
||||||
}
|
}
|
||||||
--insertMany_ $ map (TicketDependency tid) tidsDeps
|
--insertMany_ $ map (TicketDependency tid) tidsDeps
|
||||||
-- insert_ $ Follow pidAuthor fsid False True
|
-- insert_ $ Follow pidAuthor fsid False True
|
||||||
|
|
|
@ -286,7 +286,7 @@ projectOfferTicketF
|
||||||
insert_ TicketAuthorRemote
|
insert_ TicketAuthorRemote
|
||||||
{ ticketAuthorRemoteTicket = tplid
|
{ ticketAuthorRemoteTicket = tplid
|
||||||
, ticketAuthorRemoteAuthor = raidAuthor
|
, ticketAuthorRemoteAuthor = raidAuthor
|
||||||
, ticketAuthorRemoteOffer = ractid
|
, ticketAuthorRemoteOpen = ractid
|
||||||
}
|
}
|
||||||
docAccept <- insertAccept ra luOffer ltid obiidAccept
|
docAccept <- insertAccept ra luOffer ltid obiidAccept
|
||||||
-- insertMany_ $ map (TicketDependency tid) deps
|
-- insertMany_ $ map (TicketDependency tid) deps
|
||||||
|
|
|
@ -694,7 +694,7 @@ postTicketsR shr prj = do
|
||||||
ExceptT $ offerTicket shrAuthor (TextHtml title) (TextPandocMarkdown desc) shr prj
|
ExceptT $ offerTicket shrAuthor (TextHtml title) (TextPandocMarkdown desc) shr prj
|
||||||
obiid <- ExceptT $ offerTicketC shrAuthor summary audience offer
|
obiid <- ExceptT $ offerTicketC shrAuthor summary audience offer
|
||||||
ExceptT $ runDB $ do
|
ExceptT $ runDB $ do
|
||||||
mtal <- getValBy $ UniqueTicketAuthorLocalOffer obiid
|
mtal <- getValBy $ UniqueTicketAuthorLocalOpen obiid
|
||||||
return $
|
return $
|
||||||
case mtal of
|
case mtal of
|
||||||
Nothing ->
|
Nothing ->
|
||||||
|
|
|
@ -1407,6 +1407,20 @@ changes hLocal ctx =
|
||||||
"UniqueTicketAuthorRemote"
|
"UniqueTicketAuthorRemote"
|
||||||
-- 210
|
-- 210
|
||||||
, renameField "TicketAuthorRemote" "ticketNew" "ticket"
|
, 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
|
migrateDB
|
||||||
|
|
Loading…
Reference in a new issue