Upgrading from 2.4.8-1 to 3.1.0-1

Could you maybe also try this SQL statement in your database:
SELECT a.article_id FROM articles a LEFT JOIN sections s ON (a.section_id = s.section_id) WHERE s.section_id IS NULL

And maybe take a look at this post too:

maybe this one too: