# Strange Issue with Upgrading from 3.2.4 to 4.1.0

**URL:** <https://forum.mautic.org/t/strange-issue-with-upgrading-from-3-2-4-to-4-1-0/21964>\
**Category:** Mautic 4 Install/Upgrade Support\
**Created:** [December 10, 2021, 4:11pm UTC](https://forum.mautic.org/t/strange-issue-with-upgrading-from-3-2-4-to-4-1-0/21964 "2021-12-10T16:11:47Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [December 14, 2021, 9:14am UTC](https://forum.mautic.org/t/strange-issue-with-upgrading-from-3-2-4-to-4-1-0/21964/6 "2021-12-14T09:14:08Z")

</div>

So happy days. Thanks to two main factors:

1. @silavapi initial suggestion and
2. I contacted a development house that often pastes here - I won’t mention any names and was quoted 40 hours to fix the problem which would equate to $720!!

So how did I fix it ?

First I did everything above, then I went and ran the following command:

```auto
sudo -u www-data php /var/www/mautic/bin/console doctrine:migration:migrate

```

Which provided me with a detailed output:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/d/d4ee2003ee7cc53d48e2a04ea73ef6565eb098d9.png)

I then went and searched the mautic directory for where the code is calling this “generated\_email\_domain”

```auto
grep -R "generated_email" /var/www/mautic/*

```

And was provided with the file that is taking care of this call  
/var/www/mautic/app/bundles/LeadBundle/EventListener/GeneratedColumnSubscriber.php: ‘generated\_email\_domain’

I then went and made a backup of the file GeneratedColumnSubscriber.php and then went into the file to edit it.  
NOTE: I am not a developer, but I know how to read, and that’s all you really need to know 🙂

On Line 43 of this file is the problem (and this is where Ruth’s suggestion did the trick)

```auto
40 $emailDomain = new GeneratedColumn(
 41 'leads',
 42 'generated_email_domain',
 43 'VARCHAR(255)',
 44 'SUBSTRING(email, LOCATE("@", email) + 1)'

```

I went and changed VARCHAR to TEXT, saved the file and re-ran the doctrine migrate

```auto
sudo -u www-data php /var/www/mautic/bin/console doctrine:migration:migrate

```

And like magic it all worked well!!

All in all I think this exercise took about 4 hours or my time. It is proof of the strength of the community and the want for people to support and help each other!!

So a big thanks to @silavapi for initial suggestion

---

_[View the full topic](https://forum.mautic.org/t/strange-issue-with-upgrading-from-3-2-4-to-4-1-0/21964)._
