Mautic platform with errors after version update

Your software
My Mautic version is: v2.16.2
My PHP version is: 7.1.33

Your problem
My problem is: mautic platform with errors after version update

These errors are showing in the log: mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\UniqueConstraintViolationException: “An exception occurred while executing ‘INSERT INTO ma_leads (is_published, date_added, created_by, created_by_user, date_modified, modified_by, modified_by_user, checked_out, checked_out_by, checked_out_by_user, points, last_active, internal, social_cache, date_identified, preferred_profile_image, title, firstname, lastname, company, position, email, phone, mobile, address1, address2, city, state, zipcode, timezone, country, owner_id, stage_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [1, “2020-04-29 17:55:11”, null, null, null, null, null, null, null, null, 0, null, “a:0:{}”, “a:0:{}”, null, “gravatar”, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘0’ for key ‘PRIMARY’” at /opt/bitnami/apps/mautic/htdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 66 {“exception”:"[object] (Doctrine\DBAL\Exception\UniqueConstraintViolationException(code: 0): An exception occurred while executing ‘INSERT INTO ma_leads (is_published, date_added, created_by, created_by_user, date_modified, modified_by, modified_by_user, checked_out, checked_out_by, checked_out_by_user, points, last_active, internal, social_cache, date_identified, preferred_profile_image, title, firstname, lastname, company, position, email, phone, mobile, address1, address2, city, state, zipcode, timezone, country, owner_id, stage_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [1, “2020-04-29 17:55:11”, null, null, null, null, null, null, null, null, 0, null, “a:0:{}”, “a:0:{}”, null, “gravatar”, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘0’ for key ‘PRIMARY’ at /opt/bitnami/apps/mautic/htdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:66, Doctrine\DBAL\Driver\PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘0’ for key ‘PRIMARY’ at /opt/bitnami/apps/mautic/htdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘0’ for key ‘PRIMARY’ at /opt/bitnami/apps/mautic/htdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105)"}

Steps I have tried to fix the problem: Create index, this error An error occurred while updating the database

regards,

Try also the usual stuff: clear cache, make sure file ownership is okay.
Also: