Hi,

On Thu, Jan 29, 2015 at 10:39 PM, Srinidhi B S <srinidhi...@gmail.com> wrote:
> Hello Everyone,
>
> I'm (finally!) preparing to upgrade our very old ReviewBoard instance
> from 1.0.6 to 2.0.12. I've been worried / concerned about the upgrade
> path.
>

<snip/>

> The following are the changes that could not be resolved:
> The application markup has been deleted
> In model reviews.DefaultReviewer:
>     In field 'repository':
>         Property 'null' has changed
> In model reviews.ReviewRequest:
>     In field 'repository':
>         Property 'null' has changed
> CommandError: Your models contain changes that Django Evolution cannot
> resolve automatically.
> --------------------------- >% ---------------------------

We had almost given up with the direct upgrade method and deciding to
go with an upgrade plan of ReviewBoard 1.0.6 to 1.7.6 and then
upgrading to 2.0.12. We still had to manually handle some of the
apache and django configurations, which weren't too difficult to
figure out - but it would have been easier if this information was
available in a single location.

Yesterday, I decided to take a look at the above django-evolution
errors. I was able to successfully resolve the above "Property 'null'
has changed" errors after making the following changes:

diff --git a/reviewboard/reviews/evolutions/null_repository.py
b/reviewboard/reviews/evolutions/null_repository.py
index 4320d03..e7c460c 100644
--- a/reviewboard/reviews/evolutions/null_repository.py
+++ b/reviewboard/reviews/evolutions/null_repository.py
@@ -4,5 +4,5 @@ from django_evolution.mutations import ChangeField


 MUTATIONS = [
-    ChangeField('ReviewRequest', 'repository', initial=None, null=True)
+    ChangeField('ReviewRequest', 'repository', initial=None)
 ]
diff --git a/reviewboard/reviews/models/review_request.py
b/reviewboard/reviews/models/review_request.py
index 7fba0b0..d585046 100644
--- a/reviewboard/reviews/models/review_request.py
+++ b/reviewboard/reviews/models/review_request.py
@@ -160,7 +160,6 @@ class ReviewRequest(BaseReviewRequestDetails):
     repository = models.ForeignKey(Repository,
                                    related_name="review_requests",
                                    verbose_name=_("repository"),
-                                   null=True,
                                    blank=True)
     email_message_id = models.CharField(_("e-mail message ID"), max_length=255,
                                         blank=True, null=True)

The above diff was generated against "release-2.0.x" branch. I came up
with this change after comparing the output of "rb-site manage
/path/to/site sqlall reviews" run against 1.0.6 production server and
2.0.13 on my test server.

After making this change, I'm able to directly upgrade from
ReviewBoard 1.0.6 to 2.0.13 without any errors. Even "condensediffs"
ran just fine. During my testing on the UI, I can access older review
requests just fine - both in user as well as in admin dashboards.

Christian / David: Could you please confirm if the above patch looks
okay? Can you help me understand what specific things I should check /
test before performing this on production?

Regards,
Srinidhi.

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to