Keep in mind that except when DoctrineMigrationsBundle applies migrations, it actually has no idea what the database itself actually looks like. Thus, it is STRONGLY discouraged to manually alter stuff in the MySQL database on your own as you might end up in trouble down the road. As the Update Failed troubleshooting page describes, if your update ever fails and you are in trouble (and have taken a backup already) in descending order of importance you could try to:
Try the update script again - and let Mautic handle everything
Apply any outstanding migrations with doctrine:migrations:migrate
Let the ORM update the Schema with doctrine:schema:update --force
Iām not that good with database, but can you point me to where I will access this See the database schema on Github for Mautic to make sure you are adding missing ones correctly. To start adding the missing columns. Thank you
Yeah your database is all messed up. Itās trying to drop indexes, that donāt exist. There are posts about this on the Mautic forum. Basically, a past update created an index, then a subsequent update removes the index. Since you seem to have missed the update that created the index, the subsequent one to remove the index will fail.
If I recall on the forum it suggests editing the doctrine update file and removing the directive to remove the index, which isnāt necessary, since you donāt have it anyway.
So basically as I see it you have two choices,
hunt down all these issues to get your database back on track with the update process (probably a good idea).
try and fix your immediate problem by making sure you at least have the correct columns in your DB to allow the sync to run. This would have to be done manually if you donāt do #1.
Thatās a different issue. You havenāt applied the PR in my blog article to the detachEntities call. Itās broken, check my blog article posted above. It tells you which line to change to fix this issue.
I have gone through you blog post and the video I need not see the PR you are refereing to. I also, followed all comment on Github I did not see a direct solution. Can you point the solution session on the thread discussion? Thank you
See this
913 : $this->integrationEntityModel->getRepository()->detachEntities($integrationEntities);
And replacing it with the line from version 4: $this->em->clear(āMautic\PluginBundle\Entity\IntegrationEntityā);
Another thing, can I dump the current database and create another one for mautic? will it work? Please help out
Yes replacing that line with the old line fixes this issue.
I wouldnāt recommend dumping/creating a new database. Do you currently have no contacts or other data in Mautic?
Basically what I did (I think I had this problem as well recently) was to grep the files to find the database docterine file that contained the uncessary transformations and just removed that line from the docterine file. It looks like you have a few of these from the error out put. Then I got the docterine:update to work properly and it gets you back on track.
No, I donāt have any data on the database. All data is on suitcrm. Mautic is just freshly installed.
I will get it replaced now and get back to you. Thank you very much for your help. I will be buying one of your course soon