Mautic 6.0.2 to 6.0.3 Update Can’t DROP INDEX `mtc_company_match` Error

Hello,

Mautic update 6.0.3 has recently been released and I have been eager to install it.

However when you try and upgrade Mautic 6.0.2 to 6.0.3 then it fails with the same error as this post below.

Looks like the code to do the actual upgrade has not been fixed in the 6.0.3 release.

This confirm my suspicion that very little testing effort is being done to confirm upgrades will install error free putting users databases at risk.

Yes I know Mautic 5.x is the favored release and 6.x should be by passed however if its an official release then at the very least the upgrade process should work. And if there is a bug in the upgrade code then it should be fixed in the next release so that users databases are not put as risk.

Thanks.

2 Likes

Hello!

Thank you for pointing it out, I think there is never enough testing. One of the reasons is, that Mautic users are not aware how to start with tests and how to communicate with developers during testing.
I would be happy to onboard you next week, if you are interested in helping out in that area.
You can any time PM me.
Joey

Just installed 6.0.4 yesterday and upgraded to 6.0.5 today, and got this same error. The composer upgrade procedure needs to be clearer and enhanced.

I have fixed the error in the two problem files and completed the migration successfully.
I include the two fixed files. Download the file, rename its extension to .php, and then upload it to your 6x instance. Finally, re-run the command.

Hello johnwick,

Great news you have found the root cause of this issue and hopefully it will be applied to future releases in due course.

I’m currently running a production version of M6.0.3 and have not yet run an upgrade on this instance, Will the above files also work for migrating from M6.0.3 to the latest version of M6.x ?

I thought it a good idea to ask before making an attempt.

Thanks.

I had same “can’t drop index” errors and my “mautic expert” hosting company aslo could NOT solve it.. even with all ChatGPT + Claude AI help, and i also did all commands as they told and searched all forums, etc. and the “can’t drop index” came up even after full composer install, and even on full empty and new database on mautic 6.0.5 with very new almost 100% compozer fresh install also. So please solve that because it seems that bug is comiing up again and again in different forms (indexes) with every upgrade when someone migrated through from an earlier non compozer mautic.. :frowning:

Thanks, i tried it, but it did not solve my problem. So this is also one confirmation for me that this whole ‘can’t drop index’ is NOT just in this or that “VersionXY” file from migrations folder, because MAYBE you could solve that those 2 files IF your “can’t drop index” was caused by THOSE 2 files, but this “can’t drop index” can be caused by MANY THINGS, so not just from those 2 files, because your 2 file did not solve mine, and on every forum the “can’t drop index” is coming up for many different mautic tables, and for MANY different mautic versions, so thanks for your 2 files but even if they work for those who’s “can’t drop index”-es are caused by those 2 migrations this is just a very little “surface level partly solution” because every guy seems to have a slightly different “can’t drop index” problem, i checked many many forums, BUT in every version, so many files could cause the cant drop index not just those 2 files what you fixed! And even if the first time the schema update finises "with green ok” on fresh new empty database even after the same command instantly it gots the can’t drop index again… and if everybody ran into different shared hosting limits when was migrating from mautic 2 then the hole ROOT must be solved of this problem not just the “1-2 surface instances” every time.. because if the root is not solved than EVERY mautic upgrade ALSO IN THE FUTURE will be a NIGHTMARE even if every time someone solves it “ON THE SURFACE” but it really would need the REALLY DEEP LEVEL ROOT cause CURE!

IF you all want mautic to spread like wildfire because it is i am sure the real root blocking problem to that because every other problem can be solved with chatGPT or other AI or “good mautic host” but that “can’t drop index” or other similar MAPPING problems from ENTITIES like
doctrine:schema:validate seems not, like:

Mapping

[FAIL] The entity-class Mautic\DynamicContentBundle\Entity\DynamicContentLeadData mapping is invalid:

  • The association Mautic\DynamicContentBundle\Entity\DynamicContentLeadData#dynamicContent refers to the inverse side field Mautic\DynamicContentBundle\Entity\DynamicContent#id which is not defined as association.

    So i think these are caused by only ONE root cause, what generates TONS of errors in a slightly different form like these like “can’t drop index” with every upgrade or “entity mapping”, and even the most professional mautic experts says that this has NO official fix FOR THE ROOT cause!!

    So i dont know why are those issue tickets are almost all closed..

    But if you have 1 terrorist who burns down again and again many houses in each months, then you do not only have to just extinguish the fire everywhere on the houses, but the really smart move would be to catch the terrorist, the root cause, or not? And if the root cause is in doctrine itself than maybe mautic professionals should be connected to much more to the root developers of doctrine or at least talk to them, or something like that or not? :slight_smile:

Hello,

More and more end users are encountering these Mautic upgrade errors. I have been reporting them for a while and the developers are ignoring the problem.

I don’t understand why the developers expend time and effort releasing new versions if we cannot install them because of this upgrade error. Are you hoping that M7 when released will resolve the problem ?

Surely the developers priority should be to focus their attention on fixing this problem so that we can install new version as and when they are released.

Could a developer please explain their rational for not fixing this problem quickly ?

Thanks.