Currently there's no space between the index name and columns list when generating ADD INDEX sql query for MySQL DBMSes
This may cause errors on earlier MySQL versions like 3.23 (which is supported by phpBB 3.1) like
SQL ERROR [ mysql ]
You have an error in your SQL syntax near 'user(user_id, notification_read)' at line 1 
ALTER TABLE phpbb3_notifications ADD INDEX user(user_id, notification_read)
Adding a space solves the issue.