3500: Update from RB 1.6.2 to 2.0.3 failed.

ad64****@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
July 25, 2014
What version are you running?
1.6.2

What's the URL of the page containing the problem?


What steps will reproduce the problem?
1. use easy_install -U ReviewBoard to update to 2.0.3
2. rb-site upgrade /path/to/site
3.

What is the expected output? What do you see instead?
I expect the update to succeed. It doesn't. The backtrace:

Traceback (most recent call last):
  File "/usr/bin/rb-site", line 9, in <module>
    load_entry_point('ReviewBoard==2.0.3', 'console_scripts', 'rb-site')()
  File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.3-py2.6.egg/reviewboard/cmdline/rbsite.py", line 1859, in main
    command.run()
  File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.3-py2.6.egg/reviewboard/cmdline/rbsite.py", line 1657, in run
    diff_dedup_needed = site.get_diff_dedup_needed()
  File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.3-py2.6.egg/reviewboard/cmdline/rbsite.py", line 449, in get_diff_dedup_needed
    return FileDiff.objects.unmigrated().count() > 0
  File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/db/models/query.py", line 294, in count
    return self.query.get_count(using=self.db)
  File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/db/models/sql/query.py", line 390, in get_count
    number = obj.get_aggregation(using=using)[None]
  File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/db/models/sql/query.py", line 356, in get_aggregation
    result = query.get_compiler(using).execute_sql(SINGLE)
  File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: column diffviewer_filediff.diff_hash_id does not exist
LINE 1: ...CT COUNT(*) FROM "diffviewer_filediff" WHERE NOT ("diffviewe...


What operating system are you using? What browser?
Scientific Linux release 6.3 (Carbon)

Please provide any additional information below.
The issue is similar to the one addressed here: 

https://github.com/reviewboard/reviewboard/commit/11a850ca279416feed96beae9efd6c4c1f188f15

In fact, you only need to additionally catch a django.db.utils.ProgrammingError in the except block and everything works like a charm.
chipx86
#1 chipx86
Fixed on release-2.0.x (c816421). This will go into 2.0.5. Thanks!
  • +Fixed
  • +Milestone-Release2.0.x
    +Project-ReviewBoard
    +Component-RB-Site
  • +chipx86