After upgrading to Mautic 6, when I try to run migrations with:
doctrine:migrations:migrate
I get the following response:
WARNING! You are about to execute a migration in database "dxdrdzaw_p2zv1" that could result in schema changes and data loss. Are you sure you wish to continue? (yes/no) [yes]:
> [notice] Migrating up to Mautic\Migrations\Versionzz20230929183000
[notice] Migration Mautic\Migrations\Version20190326190241 skipped during Pre-Checks. Reason: "Schema includes this migration"
[notice] Migration Mautic\Migrations\Version20190410143658 skipped during Pre-Checks. Reason: "Schema includes this migration"
[notice] Schema includes this migration
[notice] Migration Mautic\Migrations\Version20190524124819 skipped during Pre-Checks. Reason: "Schema includes this migration"
[notice] Migration Mautic\Migrations\Version20200415135706 skipped during Pre-Checks. Reason: "Schema includes this migration"
[notice] Migration Mautic\Migrations\Version20200513162918 skipped during Pre-Checks. Reason: "The body_text column has already been added to the kcwo_email_copies table."
[notice] Migration Mautic\Migrations\Version20201019100000 skipped during Pre-Checks. Reason: "Table kcwo_emails_draft already exists. Skipping migration"
[notice] Migration Mautic\Migrations\Version20201026101117 skipped during Pre-Checks. Reason: "Schema includes this migration"
[notice] Migration Mautic\Migrations\Version20210115065034 skipped during Pre-Checks. Reason: "The emails table already includes the preheader_text column"
[notice] Migration Mautic\Migrations\Version20210217115150 skipped during Pre-Checks. Reason: "Deleted column already added in tables"
[notice] Index kcwo_lead_list_alias already exists
[notice] Migration Mautic\Migrations\Version20210420113309 skipped during Pre-Checks. Reason: "Schema includes this migration"
[error] Migration Mautic\Migrations\Version20211020114811 failed during Execution. Error: "An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX `kcwo_company_match`; check that it exists"
In ExceptionConverter.php line 117:
An exception occurred while executing a query: SQLSTATE[42000]: Syntax erro
r or access violation: 1091 Can't DROP INDEX `kcwo_company_match`; check th
at it exists
In Exception.php line 28:
SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX `k
cwo_company_match`; check that it exists
In Connection.php line 71:
SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX `k
cwo_company_match`; check that it exists
doctrine:migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--configuration CONFIGURATION] [--em EM] [--conn CONN] [--] [<version>]
What’s happening and how can I fix it?