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

DB: Remember whether a Bundle came from person input or auto-generated

This commit is contained in:
fr33domlover 2022-09-22 17:23:33 +00:00
parent de51fb9ab5
commit 9cb90c58c0
3 changed files with 5 additions and 2 deletions

View file

@ -2900,7 +2900,7 @@ offerTicketC (Entity senderPersonID senderPerson) senderActor summary audience t
for_ maybeOriginBranch $ \ (mlu, b) -> for_ maybeOriginBranch $ \ (mlu, b) ->
insert_ $ MergeOriginRemoteBranch originID mlu b insert_ $ MergeOriginRemoteBranch originID mlu b
for_ (justThere originOrBundle) $ \ (Material typ diffs) -> do for_ (justThere originOrBundle) $ \ (Material typ diffs) -> do
bundleID <- insert $ Bundle clothID bundleID <- insert $ Bundle clothID False
insertMany_ $ NE.toList $ NE.reverse $ insertMany_ $ NE.toList $ NE.reverse $
NE.map (Patch bundleID now typ) diffs NE.map (Patch bundleID now typ) diffs
route <- ClothR <$> encodeKeyHashid loomID <*> encodeKeyHashid clothID route <- ClothR <$> encodeKeyHashid loomID <*> encodeKeyHashid clothID
@ -3013,7 +3013,7 @@ offerTicketC (Entity senderPersonID senderPerson) senderActor summary audience t
generateGitPatches targetPath (T.unpack targetBranch) originURI (T.unpack originBranch) generateGitPatches targetPath (T.unpack targetBranch) originURI (T.unpack originBranch)
now <- liftIO getCurrentTime now <- liftIO getCurrentTime
lift $ runDB $ do lift $ runDB $ do
bundleID <- insert $ Bundle clothID bundleID <- insert $ Bundle clothID True
insertMany_ $ NE.toList $ NE.map (Patch bundleID now PatchMediaTypeGit) $ NE.reverse patches insertMany_ $ NE.toList $ NE.map (Patch bundleID now PatchMediaTypeGit) $ NE.reverse patches
{- {-

View file

@ -2700,6 +2700,8 @@ changes hLocal ctx =
TL.toStrict . TLB.toLazyText . HED.htmlEncodedText $ TL.toStrict . TLB.toLazyText . HED.htmlEncodedText $
ticket495Title ticket ticket495Title ticket
update ticketID [Ticket495Title =. plain] update ticketID [Ticket495Title =. plain]
-- 496
, addFieldPrimRequired "Bundle" False "auto"
] ]
migrateDB migrateDB

View file

@ -485,6 +485,7 @@ TicketAuthorRemote
Bundle Bundle
ticket TicketLoomId ticket TicketLoomId
auto Bool
Patch Patch
bundle BundleId bundle BundleId