# Upgrade v2.16.0 to v3.0.2

**URL:** <https://forum.mautic.org/t/upgrade-v2-16-0-to-v3-0-2/15404>\
**Category:** Mautic 3 - Install/Upgrade Support\
**Created:** [July 27, 2020, 12:04pm UTC](https://forum.mautic.org/t/upgrade-v2-16-0-to-v3-0-2/15404 "2020-07-27T12:04:58Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![dennisameling](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dennisameling/32/958_2.png) [@dennisameling](https://forum.mautic.org/u/dennisameling)\
**Post date:** [August 14, 2020, 12:58pm UTC](https://forum.mautic.org/t/upgrade-v2-16-0-to-v3-0-2/15404/15 "2020-08-14T12:58:13Z")

</div>

@voisd Apologies for the late reply.

The migration 20180329185634 belongs to Mautic 2, which means that your upgrade is stuck in step 3 of the process: [https://docs.mautic.org/en/mautic-3-upgrade/upgrade-steps#3-apply-mautic-2-database-migrations](https://docs.mautic.org/en/mautic-3-upgrade/upgrade-steps#3-apply-mautic-2-database-migrations). At this stage, you can still use your Mautic 2 installation as if nothing has happened.

This migration should have been executed in the past already, because it’s two years old: [https://github.com/mautic/mautic/tree/2.16/app/migrations](https://github.com/mautic/mautic/tree/2.16/app/migrations) - weird that that didn’t happen on your installation.

In order to proceed, we need all database migrations for Mautic 2 executed on your instance. You can trigger that process with `app/console doctrine:migrations:migrate`, which will most likely give you the error you posted above.

I looked at the specific migration and can you please do the following:

1. Open `app/migrations/Version20180329185634.php`
2. Remove line 32, which has this code in it:  
`$this->addSql("ALTER TABLE {$this->prefix}lead_event_log DROP FOREIGN KEY $fkName");` --\> **please don’t touch other parts of this file**!
3. Run `app/console doctrine:migrations:migrate` again. Fingers crossed you won’t see any other errors now 🤞
4. If the migrations succeeded, try to open the Mautic 3 upgrade script again.

Hope this helps!

---

_[View the full topic](https://forum.mautic.org/t/upgrade-v2-16-0-to-v3-0-2/15404)._
