]> git.ipfire.org Git - thirdparty/patchwork.git/commit
Fix series.project migration logic
authorAndy Doan <andy.doan@linaro.org>
Wed, 25 Jan 2017 20:17:29 +0000 (14:17 -0600)
committerStephen Finucane <stephen@that.guru>
Thu, 26 Jan 2017 23:53:28 +0000 (23:53 +0000)
commitc1d8a0d6eabad25525d1b6925e81b80030773869
tree57ce2ba39e878b36a514e6188191422cd3f4c987
parent0820ceb6ccdefce76bdf4fb0a301966c8703cfca
Fix series.project migration logic

The migration logic seems slightly off for 2 reasons:

1) If you already have series objects in your database, then adding a
non-nullable foreign key to projects will fail.

2) This may just be a remnant of my development database, but I had
series entries with no patches.

I think part #1 is *required*. I'm not totally sure about #2, but it
seems safe.

Signed-off-by: Andy Doan <andy.doan@linaro.org>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/migrations/0016_series_project.py