Correct. This is an InnoDB vs. MyISAM issue. The database on the old server 
was MyISAM, whereas on the new server it was InnoDB. Therefore during the 
rb-site upgrade, new tables were created as InnoDB whereas the existing 
ones had been migrated as MyISAM.

I fixed this by modifying the SQL dump file. For each table, I changed the 
ENGINE from MyISAM to InnoDB. (I also changed the CHARSET from latin1 to 
utf8mb4, and converted the file accordingly.)
cat reviewboard.sql | sed 's/ENGINE=MyISAM/ENGINE=InnoDB/' | sed 
's/CHARSET=latin1/CHARSET/=utf8mb4/' | iconv -f latin1 -t utf8 > reviewboard
-InnoDB-UTF8.sql

Then, after importing on the new server, I also bumped into the issue of 
diffviewer_filediff indexes. Therefore, I had to remove two indexes (found 
info in other threads). Migration to 3.0.11 then passed (Version 2.5 was 
only an attempt guessing that less modifications would generate fewer if 
any errors. Final goal is the latest version).

echo 'DROP INDEX diffviewer_filediff_4d02a56a ON diffviewer_filediff' | mysql 
-u reviewboard -p reviewboard
echo 'DROP INDEX diffviewer_filediff_79f4fcf6 ON diffviewer_filediff' | mysql 
-u reviewboard -p reviewboard

I have now the new ReviewBoard system running 3.0.11 with all data migrated.
Thanks for your hint and help.



Le mardi 8 janvier 2019 00:05:57 UTC+1, Christian Hammond a écrit :
>
> Hi,
>
> This is *usually* an InnoDB vs. MyISAM issue. Can you confirm that every 
> table type used in the old database is InnoDB? If not, they'll need to be 
> converted to MyISAM. You can do a non-data schema dump and grep for ENGINE= 
> to see what's being used.
>
> Christian
>
> On Mon, Jan 7, 2019 at 8:48 AM Didier Trosset <[email protected] 
> <javascript:>> wrote:
>
>> I am currently migrating our ReviewBoard server from one server to 
>> another.
>>
>> The old server runs ReviewBoard 2.0.24, thus I installed the very same 
>> version on the new server.
>> Then I rsync'ed the reviewboard directory, then mysqldump and reload the 
>> database, and `rb-site upgrade`.
>> All looks fine, the new server shows the same data as the old one.
>>
>> Trouble come when I want to upgrade to a newer version of ReviewBoard.
>>
>> Upgrading to 2.0.31 works perfectly. `rb-site upgrade` is happy after an 
>> apache and memcached restart.
>>
>> The trouble comes when I want to upgrade from 2.0.31 to a 2.5 version (I 
>> tried 2.5, 2.5.1, and 2.5.1.1). (And also tried 3.0 BTW).
>>
>>  # rb-site upgrade 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 accounts_trophy
>>  
>>  [!] 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-791e_b0`
>>      (errno: 150 "Foreign key constraint is incorrectly formed")')
>>
>> I've no idea how to deal with this.
>> Please help!
>>
>> PS: I've already come across the limitation to 767 bytes for the index 
>> and solved it by setting the file_format to barracuda and large_prefix on 
>> for innodb. This is solved now.
>>
>> -- 
>> 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 
>> "Review Board Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
> Christian Hammond
> President/CEO of Beanbag <https://www.beanbaginc.com/>
> Makers of Review Board <https://www.reviewboard.org/>
>

-- 
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 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to