]> git.ipfire.org Git - thirdparty/patchwork.git/commit
migrations: Don't attempt to rehome patches
authorStephen Finucane <stephen@that.guru>
Wed, 4 Mar 2020 16:52:19 +0000 (16:52 +0000)
committerStephen Finucane <stephen@that.guru>
Wed, 11 Mar 2020 10:10:50 +0000 (10:10 +0000)
commitcdf43a770a61fa38dd5a80ef659fcf8e201dcd85
treecb4af8d5ec95efb93fdfe9a6b30233cc77053528
parentd6ee204ef516643e62bcf27692dddf83e1042f5f
migrations: Don't attempt to rehome patches

Migration 0039 attempts to move patches that have ended up in an
arbitrary series due to race conditions into the correct series.
However, there are a number of race conditions that can occur here that
make this particularly tricky to do. Given that series are really just
arbitary metadata, it's not really necessary to do this...so don't.
Instead, just delete the series references that identical message IDs
and below to the same project, allowing us to add the uniqueness
constraint and prevent the issue bubbling up in the future. This means
we're still left with orphaned series but these could be fixed manually,
if necessary.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
Closes: #340
patchwork/migrations/0039_unique_series_references.py