mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-27 18:04:53 +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:
parent
b8915f1171
commit
6b0783a10b
1 changed files with 4 additions and 1 deletions
|
@ -2539,8 +2539,11 @@ changes hLocal ctx =
|
||||||
(Just $ \ (Entity topicTemp (CollabTopicLocal447 collabTemp)) -> do
|
(Just $ \ (Entity topicTemp (CollabTopicLocal447 collabTemp)) -> do
|
||||||
collabs <- selectList [] []
|
collabs <- selectList [] []
|
||||||
for_ collabs $ \ (Entity topicID topic) -> do
|
for_ collabs $ \ (Entity topicID topic) -> do
|
||||||
|
maybeLocal <- getKeyBy $ UniqueCollabTopicLocal447 $ collabTopicLocalAccept447Collab topic
|
||||||
localID <-
|
localID <-
|
||||||
insert $ CollabTopicLocal447 $ collabTopicLocalAccept447Collab topic
|
case maybeLocal of
|
||||||
|
Nothing -> error "No CollabTopicLocal for this Collab"
|
||||||
|
Just l -> return l
|
||||||
update topicID [CollabTopicLocalAccept447CollabNew =. localID]
|
update topicID [CollabTopicLocalAccept447CollabNew =. localID]
|
||||||
|
|
||||||
delete topicTemp
|
delete topicTemp
|
||||||
|
|
Loading…
Reference in a new issue