Environment
Linux 7.9
PHP 7.4
MariaDB 10.4.25
I got so fed up with the MySQL errors from upgrading 4.2 to 4.3.1 that I pulled the nuclear operation and deleted my previous 4.2.2 instance. Installing 4.3.1 did not fix the issue.
I installed using the composer method as instructed by:
After installing, I ran the commands
console doctrine:migration:migrate
console doctrine:schema:update --force
and got the following output and the same errors again.
[admin@server1 newsletter]$ console doctrine:migration:migrate
Mautic Migrations
WARNING! You are about to execute a database migration that could result in schema changes and data loss. Are you sure you wish to continue? (y/n)y
Migrating up to 20220111202917 from 0
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Schema includes this migration)
++ migrating 20180821144204
-> CREATE INDEX webhook_id_date ON webhook_queue (webhook_id, date_added)
++ migrated (took 312.5ms, used 46.5M memory)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Schema includes this migration)
++ migrating 20190704154940
Migration 20190704154940 was executed but did not result in any SQL statements.
++ migrated (took 0.90000000000009ms, used 46.5M memory)
++ migrating 20190724110039
Migration 20190724110039 was executed but did not result in any SQL statements.
++ migrated (took 532.2ms, used 46.5M memory)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: The online_status column on the users table has already been removed.)
SS skipped (Reason: Schema includes this migration)
++ migrating 20200220172041
-> UPDATE `categories` SET bundle = 'messages' WHERE bundle = '0';
++ migrated (took 0.69999999999982ms, used 48.5M memory)
++ migrating 20200227110431
-> CREATE INDEX dnc_channel_id_search ON lead_donotcontact (channel_id)
++ migrated (took 15.2ms, used 48.5M memory)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Schema includes this migration)
++ migrating 20200422144300 (Migrate mautic_lead_fields.properties to simple array)
Migration 20200422144300 was executed but did not result in any SQL statements.
++ migrated (took 1.0999999999995ms, used 48.5M memory)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: column_value is already the correct type.)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: The last_built_date column has already been added to the lead_lists table.)
++ migrating 20200815153711
-> UPDATE `leads` SET `state` = 'Bragança' WHERE `state` = 'Braganca'
-> UPDATE `leads` SET `state` = 'Coimbra' WHERE `state` = 'Colmbra'
-> UPDATE `leads` SET `state` = 'Évora' WHERE `state` = 'Ovora'
-> UPDATE `leads` SET `state` = 'Santarém' WHERE `state` = 'Santarem'
-> UPDATE `leads` SET `state` = 'Setúbal' WHERE `state` = 'Setubal'
-> UPDATE `leads` SET `state` = 'Região Autónoma dos Açores' WHERE `state` = 'Regiao Autonoma dos Acores'
-> UPDATE `leads` SET `state` = 'Região Autónoma da Madeira' WHERE `state` = 'Regiao Autonoma da Madeira'
++ migrated (took 2.8000000000002ms, used 48.5M memory)
SS skipped (Reason: Schema includes this migration)
++ migrating 20201015084627
-> UPDATE lead_fields SET label = 'Preferred Timezone' WHERE alias = 'timezone';
++ migrated (took 1ms, used 48.5M memory)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Index IDX_SEARCH already exists. Skipping the migration)
SS skipped (Reason: This instance does not use prefix, so this migration does not apply. Skipping the migration)
++ migrating 20201130201631
Migration 20201130201631 was executed but did not result in any SQL statements.
++ migrated (took 1.3000000000002ms, used 48.5M memory)
++ migrating 20201207114926
-> UPDATE lead_fields SET is_unique_identifer = 0 WHERE object = 'company';
-> UPDATE lead_fields SET is_unique_identifer = 1 WHERE object = 'company' and alias in ('companyname');
++ migrated (took 1.3999999999996ms, used 48.5M memory)
SS skipped (Reason: Schema includes this migration)
++ migrating 20201228041109
-> ALTER TABLE assets MODIFY remote_path LONGTEXT
-> ALTER TABLE assets MODIFY original_file_name LONGTEXT
++ migrated (took 6.9000000000005ms, used 48.5M memory)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Schema includes this migration)
SS skipped (Reason: Schema includes this migration)
++ migrating 20210502162314
SS skipped (Reason: No db_server_version parameter found in config/local.php, skipping this migration)
++ migrating 20210520100503
-> ALTER TABLE `email_stats` CHANGE COLUMN `tokens` `tokens` LONGTEXT CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci' NULL DEFAULT NULL COMMENT '(DC2Type:array)';
++ migrated (took 5ms, used 48.5M memory)
++ migrating 20210609191822
Migration 20210609191822 was executed but did not result in any SQL statements.
++ migrated (took 499.6ms, used 48.5M memory)
++ migrating 20210614151138
-> ALTER TABLE webhooks MODIFY webhook_url LONGTEXT NOT NULL
++ migrated (took 3.1999999999989ms, used 48.5M memory)
++ migrating 20210623071326
-> ALTER TABLE forms MODIFY post_action_property LONGTEXT
++ migrated (took 4ms, used 48.5M memory)
SS skipped (Reason: Schema includes this migration)
------------------------
++ finished in 8853.7ms
++ used 48.5M memory
++ 47 migrations executed
++ 18 sql queries
[dsnetadmin@newbeach newsletter]$ console doctrine:schema:update --force
Updating database schema...
In AbstractMySQLDriver.php line 128:
An exception occurred while executing 'DROP INDEX IDX_1AE3441319EB6921 ON oauth2_user_client_xref':
SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX `IDX_1AE3441319EB6921`; check that it exists
In Exception.php line 18:
SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX `IDX_1AE3441319EB6921`; check that it exists
In PDOConnection.php line 141:
SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX `IDX_1AE3441319EB6921`; check that it exists
doctrine:schema:update [--em EM] [--complete] [--dump-sql] [-f|--force] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>
[admin@server1 newsletter]$
4.3.1 failed quality control and should NOT have been released yet.
Any suggestions to fix this that don’t require me to deep dive into code?