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 <paul.f....@gmail.com> 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.
>
> ------------------ <begin log output> ------------------
> 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 <module>
>     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
> =======================
>
> On your code review, you say you tested RB1.5 and RB1.6 upgrades to RB2.0
> and they passed.  Can I collect more information for you to identify why
> this RB1.5 to 2.0 migration failed?
> https://reviews.reviewboard.org/r/5756/
>
> 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<javascript:_e(%7B%7D,'cvml','reviewboard%2bunsubscr...@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.

Reply via email to