When a SQL error occurs during an install or an update and it exceeds 1024 characters, a shorter version is passed to trigger_error(). The error handler in the phpBB core sets a global with the longer value and renders that. The installer does not take that approach and only shows the short version, which can make it difficult to debug errors during install/update.
I suggest taking the approach from the core: https://github.com/phpbb/phpbb/blob/3.3.x/phpBB/includes/functions.php#L2974-L2990
and adding it to the error handler in the installer: