A completely untested workaround could be to add in the SQL plugin file →
/var/www/roundcube/plugins/automatic_addressbook/SQL/mysql.initial.sql
In the first line, add IF NOT EXIST
like so →
CREATE TABLE IF NOT EXIST 'collected_contacts' (
and try to make the upgrade again…