Errors after running schema:update - foreign key constraint

The advice to run doctrine:schema:update --force originally came from here; the recommended processes that Mautic provided simply did not work.

Trying to use Mautic for my business as an end user, I’ve always had to scour the internet for solutions and explanations to make things work. Three years later nothing has changed.

automatically generating migration statements can be of great help when you are actually composing migration file during development, but its terrible idea when you are running it against production database

Why does Mautic even provide that command if it is so dangerous/destructive to use? I have no idea what migration statements are; I thought I could rely on the Mautic application to take care of the complicated stuff.

Now I’ll be googling “migration statements”, “database schemas”, indexes and “foreign keys in MySQL” and learning the intricacies of database programming for the next couple of weekends. Yay!

Edit:

Also since it seems like a problem related to incomplete migrations from the past, you might benefit from reading this: MySQL error upgrading to 4.2 - #9 by cwmarketing

I see I had already found that thread two months ago and couldn’t find anything useful in that thread - apologies for posting what turned out to be an irrelevant side issue there.

That thread has lots of different problems with people trying lots of different solutions; some work, others don’t. Recipes for bigger messes.

I’ll start from scratch, starting here - I wouldn’t call that a “solution”, hints for troubleshooting at best… - and then googling and doubling-checking everything. Will post my findings in a next comment on this thread.

Why don’t migrations just work in Mautic?