Sylius / InvoicingPlugin

Generate an Invoice for every placed order
MIT License
79 stars 82 forks source link

During reverting migrations Version20191216134233 is failing #288

Closed tulik closed 2 years ago

tulik commented 2 years ago

During running bin/console doctrine:migrations:migrate first:

[notice] Migrating down to 0
[error] Migration Sylius\InvoicingPlugin\Migrations\Version20191216134233 failed during Execution. Error: "An exception occurred while executing 'ALTER TABLE sylius_invoicing_plugin_invoice DROP FOREIGN KEY FK_3AA279BFB5282EDF':

SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'FK_3AA279BFB5282EDF'; check that column/key exists"

In AbstractMySQLDriver.php line 128:

  An exception occurred while executing 'ALTER TABLE sylius_invoicing_plugin_invoice DROP FOREIGN KEY FK_3AA279BFB528
  2EDF':

  SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'FK_3AA279BFB5282EDF'; check that column/key exi
  sts

In Exception.php line 18:

  SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'FK_3AA279BFB5282EDF'; check that column/key exi
  sts

In PDOConnection.php line 141:

  SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'FK_3AA279BFB5282EDF'; check that column/key exi
  sts
GSadee commented 2 years ago

Hi @tulik, thank you for reporting the bug. Indeed, there was a problem that the inexistent key was removed.