Hi Chris,

I repeated the test to ensure the database wasn't empty.  I confirmed that
I'd imported the RB1.5 database, ready for "rb-site upgrade".

Steps:
# rb-site install /var/www/reviewboard
mysql> drop database reviewboard;
mysql> create database reviewboard;
# mysql -uroot -p reviewboard < ~/reviewboard.mysql.dump           <= Note
reviewboard database is no longer empty, it contains content from RB1.5
from a separate machine.
# rb-site upgrade /var/www/reviewboard


Result: Same failure as previously posted.
django.db.utils.OperationalError: (1054, "Unknown column
'diffviewer_filediff.diff_hash_id' in 'where clause'")

This migration procedure works on Centos6.5 with RB1.7.22, but failed on
Fedora rawhide with RB2.0RC2 (from Stephen Gallagher's COPR repo).

Is there more info I can collect to help debug?  How far back does RB2.0
support an upgrade from?  Should I upgrade via an intermediate version?

Thanks,
Paul


On 18 April 2014 20:00, Christian Hammond <chip...@chipx86.com> wrote:

> Hi Paul,
>
> rb-site upgrade isn't meant to be used on a completely empty database. It
> expects an existing install, so when you dropped and recreated the
> database, it was unable to find the state it needs to perform an actual
> upgrade.
>
> If you need to just start fresh from a database, you can re-run install,
> or:
>
>     $ rb-site manage /path/to/site syncdb
>
> That should generate a fresh new database (if there isn't already any
> schema).
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board - http://www.reviewboard.org
> Beanbag, Inc. - http://www.beanbaginc.com
>
>
> On Fri, Apr 18, 2014 at 4:54 AM, Paul Fee <paul.f....@gmail.com> wrote:
>
>> Hi all,
>>
>> I was testing migration from a 1.5 system to 2.0RC2.
>>
>> I took a mysql dump from the old system and copied it to the new system.
>> Following an "rb-site install" on the new system, I dropped and recreated
>> the reviewboard database, then tried "rb-site upgrade <path>".
>>
>> This procedure worked on CentOS6/EPEL/ReviewBoard 1.7.22, however with
>> Fedora rawhide/COPR/Reviewboard 2.0RC2, I get this error:
>>
>> $ sudo rb-site upgrade /var/www/reviewboard
>> Traceback (most recent call last):
>>   File "/bin/rb-site", line 9, in <module>
>>     load_entry_point('ReviewBoard==2.0rc2', 'console_scripts',
>> 'rb-site')()
>>   File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py",
>> line 1727, in main
>>     command.run()
>>   File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py",
>> line 1530, in run
>>     diff_dedup_needed = site.get_diff_dedup_needed()
>>   File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py",
>> line 443, in get_diff_dedup_needed
>>     return FileDiff.objects.unmigrated().count() > 0
>>   File "/usr/lib/python2.7/site-packages/django/db/models/query.py", line
>> 291, in count
>>     return self.query.get_count(using=self.db)
>>   File "/usr/lib/python2.7/site-packages/django/db/models/sql/query.py",
>> line 390, in get_count
>>     number = obj.get_aggregation(using=using)[None]
>>   File "/usr/lib/python2.7/site-packages/django/db/models/sql/query.py",
>> line 356, in get_aggregation
>>     result = query.get_compiler(using).execute_sql(SINGLE)
>>   File
>> "/usr/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line
>> 782, in execute_sql
>>     cursor.execute(sql, params)
>>   File "/usr/lib/python2.7/site-packages/django/db/backends/util.py",
>> line 53, in execute
>>     return self.cursor.execute(sql, params)
>>   File "/usr/lib/python2.7/site-packages/django/db/utils.py", line 99, in
>> __exit__
>>     six.reraise(dj_exc_type, dj_exc_value, traceback)
>>   File "/usr/lib/python2.7/site-packages/django/db/backends/util.py",
>> line 53, in execute
>>     return self.cursor.execute(sql, params)
>>   File
>> "/usr/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line
>> 124, in execute
>>     return self.cursor.execute(query, args)
>>   File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 174,
>> in execute
>>     self.errorhandler(self, exc, value)
>>   File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line
>> 36, in defaulterrorhandler
>>     raise errorclass, errorvalue
>> django.db.utils.OperationalError: (1054, "Unknown column
>> 'diffviewer_filediff.diff_hash_id' in 'where clause'")
>>
>> Since this worked with reviewboard 1.7, I presume this is a bug in 2.0.
>> Would you like more data to help diagnose the issue?
>>
>> Thanks,
>> Paul
>>
>> --
>> Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
>> ---
>> Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
>> ---
>> Happy user? Let us know at http://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.
>>
>
>  --
> Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
> ---
> Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
> ---
> Happy user? Let us know at http://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "reviewboard" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/reviewboard/4gNGVu3Gveg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://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