Adyen / adyen-shopware6

Adyen Payment plugin for Shopware 6
MIT License
21 stars 22 forks source link

Re-installation duplicate key exception #540

Closed damian-pastorini closed 2 months ago

damian-pastorini commented 2 months ago

Describe the bug Exception throw after second time installation:

Shopware Plugin Lifecycle Service
=================================

 Install 1 plugin(s):
 * Adyen Payment (v4.1.0)

08:45:26 ERROR     [app] Migration: "Adyen\Shopware\Migration\Migration1681716164AlterAdyenPayment" failed: "An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'UQ_ADYEN_PAYMENT_PSPREFERENCE'"

In ExceptionConverter.php line 118:

  [Doctrine\DBAL\Exception\DriverException (1061)]                                                                                         
  An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'UQ_ADYEN_PAYMENT_PSPREFERENCE'      

Versions Shopware version: 6.6.5.1 Plugin version: 4.1.0

To Reproduce Steps to reproduce the behavior:

  1. Install the plugin.
  2. Uninstall the plugin.
  3. Install again.
  4. See the error.

Expected behavior Installation should be success the second time as well.

Screenshots image

Desktop (please complete the following information):

damian-pastorini commented 2 months ago

Duplicates https://github.com/Adyen/adyen-shopware6/issues/426