I found another discussion about this issue on this forum [forum post 
<https://groups.google.com/forum/#!topic/reviewboard/N8Z652ccb6M>] and sure 
enough, my database dump shows that the tables are using MyISAM. I 
converted the database dump to specify InnoDB instead using the following 
command and did a new import followed by an rb-site upgrade.

sed 's/) ENGINE=MyISAM/) ENGINE=InnoDB/g' reviewboard.sql > reviewboard2.sql


This took a really long time to import, so be sure you get it right before 
you try the import. I added wait_timeout = 31536000 to the [server] section 
of /etc/my.cnf.d/server.cnf and restarted MariaDB to ensure that the import 
had time to complete. Also, make sure you have enough free disk space to 
complete the import.

Ultimately, this appears to have worked and given us successful migration 
of the database. Hopefully, this thread helps someone else. :)

On Friday, March 24, 2017 at 9:16:05 AM UTC-4, Chris Eagan wrote:
>
> When attempting to perform an rb-site upgrade from version 2.0.18 to 
> 2.5.9, I get the following output, ending in an error. If I continue, 
> further table creation issues occur and the result is a corrupted database. 
> I do have a backup of the database, which I have been using to restore and 
> test the migrations.
>
> Rebuilding directory structure
> Upgrading site settings_local.py
> 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 attachments_fileattachmenthistory
> Creating table diffviewer_rawfilediffdata
> Creating table notifications_webhooktarget_repositories
>
>
> [!] 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-64a_3'
>     (errno: 150)")
>
>
> Press Enter to continue
>
>
> The permissions are correct and I even tried running the command by 
> specifying the root user of the database and their password. Some Googling 
> makes this seem like it could be due to Foreign key issues where the new 
> databases are being created out of order. I am wondering if disabling 
> Foreign Key Checks globally, performing the migration, and then enabling 
> the checks again would help and if it would be safe with respect to 
> ReviewBoard itself.
>
> Something like:
>
> SET GLOBAL FOREIGN_KEY_CHECKS=0;
>
>
> Run the rb-site upgrade.
>
>  
>
> SET GLOBAL FOREIGN_KEY_CHECKS=1;
>
>
> Thoughts? Recommendations?
>

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