Re: Reviewboard 2.0: rb-site upgrade failed migrating from 1.5.

2014-05-02 Thread Paul Fee
Hi Chris,

I replaced ") ENGINE=MyISAM" with ") ENGINE=InnoDB" in my database dump and
repeated the import.  This fixed the "Foreign key constraint is incorrectly
formed" errors.

Thanks for that tip, mysql table types may be outside the scope of "rb-site
upgrade", however if the upgrade could recognise this error and give an
informative error message it may help others with future migrations,
allowing them to fix the error themselves.

The upgrade now proceeds past the "Creating table X" section, but I still
get "'NoneType' object is not iterable" errors:

=
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
Registering new SCM Tool Plastic SCM
(reviewboard.scmtools.plastic.PlasticTool) in database
ERROR:root:Unexpected error: 'NoneType' object is not iterable
Traceback (most recent call last):
  File
"/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
line 65, in handle
self.evolve(*app_labels, **options)
  File
"/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
line 125, in evolve
sql.extend(self.evolve_app(app))
  File
"/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
line 165, in evolve_app
app_mutator_sql = app_mutator.to_sql()
  File "/usr/lib/python2.7/site-packages/django_evolution/mutators.py",
line 303, in to_sql
sql.extend(mutator.to_sql())
  File "/usr/lib/python2.7/site-packages/django_evolution/mutators.py",
line 186, in to_sql
return self.evolver.generate_table_ops_sql(self, self._ops)
  File "/usr/lib/python2.7/site-packages/django_evolution/db/common.py",
line 42, in generate_table_ops_sql
prev_sql_result, prev_op)
  File "/usr/lib/python2.7/site-packages/django_evolution/db/common.py",
line 92, in generate_table_op_sql
sql_result.add(op['sql'])
  File
"/usr/lib/python2.7/site-packages/django_evolution/db/sql_result.py", line
105, in add
super(AlterTableSQLResult, self).add(sql_result)
  File
"/usr/lib/python2.7/site-packages/django_evolution/db/sql_result.py", line
30, in add
self.sql += sql_or_result
TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/bin/rb-site", line 9, in 
load_entry_point('ReviewBoard==2.0rc2', 'console_scripts', 'rb-site')()
  File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py",
line 1733, in main
command.run()
  File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py",
line 1556, in run
site.migrate_database()
  File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py",
line 425, in migrate_database
self.run_manage_command("evolve", ["--noinput", "--execute"])
  File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py",
line 626, in run_manage_command
execute_from_command_line([__file__, cmd] + params)
  File
"/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line
399, in execute_from_command_line
utility.execute()
  File
"/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line
392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py",
line 242, in run_from_argv
self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py",
line 285, in execute
output = self.handle(*args, **options)
  File
"/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
line 65, in handle
self.evolve(*app_labels, **options)
  File
"/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
line 125, in evolve
sql.extend(self.evolve_app(app))
  File
"/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
line 165, in evolve_app
app_mutator_sql = app_mutator.to_sql()
  File "/usr/lib/python2.7/site-packages/django_evolution/mutators.py",
line 303, in to_sql
sql.extend(mutator.to_sql())
  File "/usr/lib/python2.7/site-packages/django_evolution/mutators.py",
line 186, in to_sql
return self.evolver.generate_table_ops_sql(self, self._ops)
  File "/usr/lib/python2.7/site-packages/django_evolution/db/common.py",
line 42, in generate_table_ops_sql
prev_sql_result, prev_op)
  File "/usr/lib/python2.7/site-packages/django_evolution/db/common.py",
line 92, in generate_table_op_sql
sql_result.add(op['sql'])
  File
"/usr/lib/python2.7/site-packages/django_evolution/db/sql_result.py", line
105, in add
super(AlterTableSQLResult, self).add(sql_result)
  File
"/usr/lib/python2.7/site-packages/django_evolution/db/sql_result.py", line
30, in add
self.sql += sql_or_result
TypeError: 'NoneType' object is not iterable
===

Can you help with this problem?

Thanks,
Paul


On 1 May 2014 19:01, Christian Hammond  wrote:

> Hi Paul,
>
> Your database is using MyISAM while MySQL is configuring new databases to
> 

Re: Reviewboard 2.0: rb-site upgrade failed migrating from 1.5.

2014-05-01 Thread Christian Hammond
Hi Paul,

Your database is using MyISAM while MySQL is configuring new databases to
use InnoDB. You'll need to edit your database dump to set all table types
to InnoDB and re-import/upgrade.

This is a more general MySQL issue, and not one we really have control over
during upgrade.

Christian

On Thursday, May 1, 2014, Paul Fee  wrote:

> Hi Christian,
>
> I found your fix on github and manually applied the change to rbsite.py
>
>
> https://github.com/reviewboard/reviewboard/commit/11a850ca279416feed96beae9efd6c4c1f188f15
>
> Repeating the procedure allows "rb-site upgrade" to get past the previous
> error:
> django.db.utils.OperationalError: (1054, "Unknown column
> 'diffviewer_filediff.diff_hash_id' in 'where clause'")
>
> However, I see new errors now:
> =
> $ sudo rb-site upgrade /var/www/reviewboard
> Rebuilding directory structure
> Updating database. This may take a while.
>
> The log output below, including warnings and errors,
> can be ignored unless upgrade fails.
>
> --  --
> Creating tables ...
> Creating table extensions_registeredextension
> Creating table attachments_fileattachment
>
> [!] There was an error synchronizing the database. Make sure the
> database is created and has the appropriate permissions, and then
> continue.
> [!] Details: (1005, 'Can\'t create table `reviewboard`.`#sql-605_11`
> (errno: 150 "Foreign key constraint is incorrectly formed")')
>
> Press Enter to continue
> ==
>
> Pressing enter a few times gives the same error for the following tables:
> * site_localsite_users
> * site_localsite_admins
> * accounts_localsiteprofile
>
> After that rb-site continues and finally exits with this error output:
> =
> Installing custom SQL ...
> Installing indexes ...
> Installed 0 object(s) from 0 fixture(s)
> Registering new SCM Tool Plastic SCM
> (reviewboard.scmtools.plastic.PlasticTool) in database
> ERROR:root:Unexpected error: 'NoneType' object is not iterable
> Traceback (most recent call last):
>   File
> "/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
> line 65, in handle
> self.evolve(*app_labels, **options)
>   File
> "/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
> line 125, in evolve
> sql.extend(self.evolve_app(app))
>   File
> "/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
> line 165, in evolve_app
> app_mutator_sql = app_mutator.to_sql()
>   File "/usr/lib/python2.7/site-packages/django_evolution/mutators.py",
> line 303, in to_sql
> sql.extend(mutator.to_sql())
>   File "/usr/lib/python2.7/site-packages/django_evolution/mutators.py",
> line 186, in to_sql
> return self.evolver.generate_table_ops_sql(self, self._ops)
>   File "/usr/lib/python2.7/site-packages/django_evolution/db/common.py",
> line 42, in generate_table_ops_sql
> prev_sql_result, prev_op)
>   File "/usr/lib/python2.7/site-packages/django_evolution/db/common.py",
> line 92, in generate_table_op_sql
> sql_result.add(op['sql'])
>   File
> "/usr/lib/python2.7/site-packages/django_evolution/db/sql_result.py", line
> 105, in add
> super(AlterTableSQLResult, self).add(sql_result)
>   File
> "/usr/lib/python2.7/site-packages/django_evolution/db/sql_result.py", line
> 30, in add
> self.sql += sql_or_result
> TypeError: 'NoneType' object is not iterable
> Traceback (most recent call last):
>   File "/bin/rb-site", line 9, in 
> load_entry_point('ReviewBoard==2.0rc2', 'console_scripts', 'rb-site')()
>   File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py",
> line 1733, in main
> command.run()
>   File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py",
> line 1556, in run
> site.migrate_database()
>   File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py",
> line 425, in migrate_database
> self.run_manage_command("evolve", ["--noinput", "--execute"])
>   File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py",
> line 626, in run_manage_command
> execute_from_command_line([__file__, cmd] + params)
>   File
> "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line
> 399, in execute_from_command_line
> utility.execute()
>   File
> "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line
> 392, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/usr/lib/python2.7/site-packages/django/core/management/base.py",
> line 242, in run_from_argv
> self.execute(*args, **options.__dict__)
>   File "/usr/lib/python2.7/site-packages/django/core/management/base.py",
> line 285, in execute
> output = self.handle(*args, **options)
>   File
> "/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
> line 65, in handle
> self.evolve(*app_labels, **options)
>   File

Re: Reviewboard 2.0: rb-site upgrade failed migrating from 1.5.

2014-05-01 Thread Paul Fee
Hi Christian,

I found your fix on github and manually applied the change to rbsite.py

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

Repeating the procedure allows "rb-site upgrade" to get past the previous 
error:
django.db.utils.OperationalError: (1054, "Unknown column 
'diffviewer_filediff.diff_hash_id' in 'where clause'")

However, I see new errors now:
=
$ sudo rb-site upgrade /var/www/reviewboard
Rebuilding directory structure
Updating database. This may take a while.

The log output below, including warnings and errors,
can be ignored unless upgrade fails.

--  --
Creating tables ...
Creating table extensions_registeredextension
Creating table attachments_fileattachment

[!] There was an error synchronizing the database. Make sure the
database is created and has the appropriate permissions, and then
continue.
[!] Details: (1005, 'Can\'t create table `reviewboard`.`#sql-605_11`
(errno: 150 "Foreign key constraint is incorrectly formed")')

Press Enter to continue
==

Pressing enter a few times gives the same error for the following tables:
* site_localsite_users
* site_localsite_admins
* accounts_localsiteprofile

After that rb-site continues and finally exits with this error output:
=
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
Registering new SCM Tool Plastic SCM 
(reviewboard.scmtools.plastic.PlasticTool) in database
ERROR:root:Unexpected error: 'NoneType' object is not iterable
Traceback (most recent call last):
  File 
"/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
 
line 65, in handle
self.evolve(*app_labels, **options)
  File 
"/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
 
line 125, in evolve
sql.extend(self.evolve_app(app))
  File 
"/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
 
line 165, in evolve_app
app_mutator_sql = app_mutator.to_sql()
  File "/usr/lib/python2.7/site-packages/django_evolution/mutators.py", 
line 303, in to_sql
sql.extend(mutator.to_sql())
  File "/usr/lib/python2.7/site-packages/django_evolution/mutators.py", 
line 186, in to_sql
return self.evolver.generate_table_ops_sql(self, self._ops)
  File "/usr/lib/python2.7/site-packages/django_evolution/db/common.py", 
line 42, in generate_table_ops_sql
prev_sql_result, prev_op)
  File "/usr/lib/python2.7/site-packages/django_evolution/db/common.py", 
line 92, in generate_table_op_sql
sql_result.add(op['sql'])
  File 
"/usr/lib/python2.7/site-packages/django_evolution/db/sql_result.py", line 
105, in add
super(AlterTableSQLResult, self).add(sql_result)
  File 
"/usr/lib/python2.7/site-packages/django_evolution/db/sql_result.py", line 
30, in add
self.sql += sql_or_result
TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/bin/rb-site", line 9, in 
load_entry_point('ReviewBoard==2.0rc2', 'console_scripts', 'rb-site')()
  File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py", 
line 1733, in main
command.run()
  File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py", 
line 1556, in run
site.migrate_database()
  File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py", 
line 425, in migrate_database
self.run_manage_command("evolve", ["--noinput", "--execute"])
  File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py", 
line 626, in run_manage_command
execute_from_command_line([__file__, cmd] + params)
  File 
"/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 
399, in execute_from_command_line
utility.execute()
  File 
"/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 
392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", 
line 242, in run_from_argv
self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", 
line 285, in execute
output = self.handle(*args, **options)
  File 
"/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
 
line 65, in handle
self.evolve(*app_labels, **options)
  File 
"/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
 
line 125, in evolve
sql.extend(self.evolve_app(app))
  File 
"/usr/lib/python2.7/site-packages/django_evolution/management/commands/evolve.py",
 
line 165, in evolve_app
app_mutator_sql = app_mutator.to_sql()
  File "/usr/lib/python2.7/site-packages/django_evolution/mutators.py", 
line 303, in to_sql
sql.extend(mutator.to_sql())
  File "/usr/lib/python2.7/site-packages/django_evolution/mutators.py", 
line 186, in to_sql
ret

Re: Reviewboard 2.0: rb-site upgrade failed migrating from 1.5.

2014-04-30 Thread Christian Hammond
Hi guys,

I committed a fix for this. It's pretty trivial to hand-apply. Not at the
computer or I'd send a link.

This will be in RC3.

Christian


On Wednesday, April 30, 2014, Bruce Cran  wrote:

> When I upgraded from 1.7.9 to 2.0 RC2 I had to go via 1.7.24 otherwise I
> got an 'Unknown column' error (I can't remember if it was the same one).
>
> --
> Bruce
>
>
> On Wed, Apr 30, 2014 at 1:26 PM, Stephen Gallagher <
> step...@gallagherhome.com
> > wrote:
>
>>
>> It worked cleanly for me.
>>
>>  --
> 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.
>


-- 
-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com

-- 
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.


Re: Reviewboard 2.0: rb-site upgrade failed migrating from 1.5.

2014-04-30 Thread Bruce Cran
When I upgraded from 1.7.9 to 2.0 RC2 I had to go via 1.7.24 otherwise I
got an 'Unknown column' error (I can't remember if it was the same one).

-- 
Bruce


On Wed, Apr 30, 2014 at 1:26 PM, Stephen Gallagher <
step...@gallagherhome.com> wrote:

>
> It worked cleanly for me.
>
>

-- 
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.


Re: Reviewboard 2.0: rb-site upgrade failed migrating from 1.5.

2014-04-30 Thread Stephen Gallagher
On 04/30/2014 08:35 AM, Alexander Zhogov wrote:
> Hi Christian,
> 
> I faced the same exception with a similar scenario. The "rb-site manage
> /path/to/site syncdb" command doesn't help.
> I am testing migration from the old system with Review Board 1.5 to a
> new CentOS 6.5 with Review Board 2.0 RC2:
> 1. Installed Review Board 2.0 RC2 on CentOS 6.5.
> 2. Restored mysql dump from the old system.
> 3. Run "rb-site upgrade ".
> 
> Could you please help us to resolve the issue with migration?
> 

For what it's worth, I tested a migration on Monday as follows:

1) Took a 'dumpdb' of a 1.7.25 server.
2) Installed a new 1.7.25 site on a new server
3) Imported the DB of the original
4) Tweaked the DB contents to point to the new path on disk (Relic of
OpenShift, didn't have exactly the same location)
5) Upgraded to 2.0 RC2 with easy_install
6) Ran rb-site upgrade

It worked cleanly for me.



I haven't tested trying to load the 1.7.25 DB directly into the 2.0
install, but this path worked.

-- 
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.


Re: Reviewboard 2.0: rb-site upgrade failed migrating from 1.5.

2014-04-30 Thread Christian Hammond
I'll look into this today.

We decided to do at least one more RC, which will be soon, so I'll have
something you guys can test before a final 2.0 is out.

Christian


On Wednesday, April 30, 2014, Alexander Zhogov  wrote:

> Hi Christian,
>
> I faced the same exception with a similar scenario. The "rb-site manage
> /path/to/site syncdb" command doesn't help.
> I am testing migration from the old system with Review Board 1.5 to a new
> CentOS 6.5 with Review Board 2.0 RC2:
> 1. Installed Review Board 2.0 RC2 on CentOS 6.5.
> 2. Restored mysql dump from the old system.
> 3. Run "rb-site upgrade ".
>
> Could you please help us to resolve the issue with migration?
>


-- 
-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com

-- 
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.


Re: Reviewboard 2.0: rb-site upgrade failed migrating from 1.5.

2014-04-30 Thread Alexander Zhogov
Hi Christian,

I faced the same exception with a similar scenario. The "rb-site manage 
/path/to/site syncdb" command doesn't help.
I am testing migration from the old system with Review Board 1.5 to a new 
CentOS 6.5 with Review Board 2.0 RC2:
1. Installed Review Board 2.0 RC2 on CentOS 6.5.
2. Restored mysql dump from the old system.
3. Run "rb-site upgrade ".

Could you please help us to resolve the issue with migration?

-- 
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.


Re: Reviewboard 2.0: rb-site upgrade failed migrating from 1.5.

2014-04-30 Thread Paul Fee
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  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  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 ".
>>
>> 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 
>> 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.g

Re: Reviewboard 2.0: rb-site upgrade failed migrating from 1.5.

2014-04-18 Thread Christian Hammond
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  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 ".
>
> 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 
> 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 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.