Problem: JUST AFTER you did the migration and you try to reply on a discussion which have more than 0 replies it throws an exception. The first time it won't work. The second time it does.
[2018-12-06 22:45:58] production.ERROR: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2-2' for key 'posts_discussion_id_number_unique' in /home/vagrant/flarum/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117
Cause: Initially post_number_index (in table discussions) doesn't get set in the mybb to flarum migration. It does update the value after the first try of submitting a reply.
Solution: update the field post_number_index in the migration
Problem: JUST AFTER you did the migration and you try to reply on a discussion which have more than 0 replies it throws an exception. The first time it won't work. The second time it does.
Cause: Initially
post_number_index
(in tablediscussions
) doesn't get set in the mybb to flarum migration. It does update the value after the first try of submitting a reply.Solution: update the field
post_number_index
in the migration