[feature/oauth] Fix more errors related to sql changes

PHPBB3-11673