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

DB: Migration: Fix error in mig 447, accidentally creation CollabTopicLocal

Repo/Loom/Deck created one in their migrations, but CollabTopicAccept isn't
itself a topic, it's just a helper, so it needs to *find* the relevant
CollabTopicLocal rather than create a new one.
This commit is contained in:
fr33domlover 2022-09-26 13:12:44 +00:00
parent b8915f1171
commit 6b0783a10b

View file

@ -2539,8 +2539,11 @@ changes hLocal ctx =
(Just $ \ (Entity topicTemp (CollabTopicLocal447 collabTemp)) -> do
collabs <- selectList [] []
for_ collabs $ \ (Entity topicID topic) -> do
maybeLocal <- getKeyBy $ UniqueCollabTopicLocal447 $ collabTopicLocalAccept447Collab topic
localID <-
insert $ CollabTopicLocal447 $ collabTopicLocalAccept447Collab topic
case maybeLocal of
Nothing -> error "No CollabTopicLocal for this Collab"
Just l -> return l
update topicID [CollabTopicLocalAccept447CollabNew =. localID]
delete topicTemp