MySQL error upgrading to 4.2

I ran into a similar issue going from 4.1.x to 4.2. on MariaDB

The process failed at bin/console mautic:update:apply.

The log indicated :Error thrown while running command “doctrine:migrations:migrate --quiet --no-interaction”. Message: "An exception occurred while executing 'ALTER TABLE maup6_lead_event_log RENAME INDEX IDX_SEARCH TO maup6_IDX_SEARCH':

I manually created maup6_IDX_SEARCH using the same values as IDX_SEARCH, then deleted IDX_SEARCH.

I then reran at received a new error:

console.CRITICAL: Error thrown while running command “doctrine:migrations:migrate --quiet --no-interaction”. Message: “An exception occurred while executing ‘ALTER TABLE maup6_email_stats CHANGE COLUMN tokens tokens LONGTEXT CHARACTER SET ‘utf8mb4’ COLLATE ‘utf8mb4_unicode_ci’ NULL DEFAULT NULL COMMENT ‘(DC2Type:array)’;’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘danianim_maut458.parcr.date_sent’ in ‘GENERATED ALWAYS’” {“exception”:"[object] (Doctrine\DBAL\Exception\InvalidFieldNameException(code: 0):

Reran apply and received the happy congratulations 4.2 message, but the site 403s.

then ran the dump sql script that returned 155 updates:

Took a back up, then ran the same script with --force which returned the FK errors above.

Not sure why my db is so far out of wack as every previous upgrade as executed successfully.

I can start stepping thru each update and debugging, but not sure that’s best approach.

Solved with commenting out

    <FilesMatch "\.php$">
        Require all denied

per this: 403 Error after Mautic 3.3.5 update - #5 by rcheesley

Where did you “solve” this @patrickeidemiller? Where did you “comment out” these lines? Looks like .htaccess. How is this connected with the SQL error?

I have the exact same problem as the start of this thread and don’t see a clear solution here.

Yeah, it’s in the .htaccess file. Commenting out this bit solved my problem of nothing showing (blank page) when I went to my Mautic directory URL. It’s not related to our larger issue of foreign key constraints. :frowning_face:

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.