# Error after upgrading to 4.2 clearing cache fails and error: Unknown column last\_built\_date in field list

**URL:** <https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866>\
**Category:** Mautic 4 Install/Upgrade Support\
**Created:** [March 1, 2022, 4:08pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866 "2022-03-01T16:08:50Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [March 1, 2022, 4:08pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/1 "2022-03-01T16:08:50Z")

</div>

**Your software**  
_My PHP version is_ : 7.4  
_My MySQL/MariaDB version is_ (delete as applicable): MySQL/MariaDB version MySQL 5

**Updating/Installing Errors**  
_I am_ (delete as applicable): Updating  
_Upgrading/installing via_ (delete as applicable) : Web

_These errors are showing in the installer_ :

_These errors are showing in the Mautic log_ :

[2022-03-01 15:53:02] mautic.NOTICE: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing ‘SELECT l0\_.is\_published AS is\_published\_0, l0\_.date\_added AS date\_added\_1, l0\_.created\_by AS created\_by\_2, l0\_.created\_by\_user AS created\_by\_user\_3, l0\_.date\_modified AS date\_modified\_4, l0\_.modified\_by AS modified\_by\_5, l0\_.modified\_by\_user AS modified\_by\_user\_6, l0\_.checked\_out AS checked\_out\_7, l0\_.checked\_out\_by AS checked\_out\_by\_8, l0\_.checked\_out\_by\_user AS checked\_out\_by\_user\_9, l0\_.id AS id\_10, l0\_.name AS name\_11, l0\_.description AS description\_12, l0\_.alias AS alias\_13, l0\_.public\_name AS public\_name\_14, l0\_.filters AS filters\_15, l0\_.is\_global AS is\_global\_16, l0\_.is\_preference\_center AS is\_preference\_center\_17, l0\_.last\_built\_date AS last\_built\_date\_18, l0\_.category\_id AS category\_id\_19 FROM lead\_lists l0\_ LEFT JOIN categories c1\_ ON l0\_.category\_id = c1\_.id ORDER BY l0\_.name ASC’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l0\_.last\_built\_date’ in ‘field list’ (uncaught exception) at /home/agwmadmin/mas.agwm.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 79 while running console command `mautic:segments:update`    
[2022-03-01 15:53:02] mautic.WARNING: Command `mautic:segments:update` exited with status code 1    
[2022-03-01 15:58:01] mautic.NOTICE: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing ‘SELECT l0\_.is\_published AS is\_published\_0, l0\_.date\_added AS date\_added\_1, l0\_.created\_by AS created\_by\_2, l0\_.created\_by\_user AS created\_by\_user\_3, l0\_.date\_modified AS date\_modified\_4, l0\_.modified\_by AS modified\_by\_5, l0\_.modified\_by\_user AS modified\_by\_user\_6, l0\_.checked\_out AS checked\_out\_7, l0\_.checked\_out\_by AS checked\_out\_by\_8, l0\_.checked\_out\_by\_user AS checked\_out\_by\_user\_9, l0\_.id AS id\_10, l0\_.name AS name\_11, l0\_.description AS description\_12, l0\_.alias AS alias\_13, l0\_.public\_name AS public\_name\_14, l0\_.filters AS filters\_15, l0\_.is\_global AS is\_global\_16, l0\_.is\_preference\_center AS is\_preference\_center\_17, l0\_.last\_built\_date AS last\_built\_date\_18, l0\_.category\_id AS category\_id\_19 FROM lead\_lists l0\_ LEFT JOIN categories c1\_ ON l0\_.category\_id = c1\_.id ORDER BY l0\_.name ASC’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l0\_.last\_built\_date’ in ‘field list’ (uncaught exception) at /home/agwmadmin/mas.agwm.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 79 while running console command `mautic:segments:update`    
[2022-03-01 15:58:01] mautic.WARNING: Command `mautic:segments:update` exited with status code 1    
[2022-03-01 16:03:02] mautic.NOTICE: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing ‘SELECT l0\_.is\_published AS is\_published\_0, l0\_.date\_added AS date\_added\_1, l0\_.created\_by AS created\_by\_2, l0\_.created\_by\_user AS created\_by\_user\_3, l0\_.date\_modified AS date\_modified\_4, l0\_.modified\_by AS modified\_by\_5, l0\_.modified\_by\_user AS modified\_by\_user\_6, l0\_.checked\_out AS checked\_out\_7, l0\_.checked\_out\_by AS checked\_out\_by\_8, l0\_.checked\_out\_by\_user AS checked\_out\_by\_user\_9, l0\_.id AS id\_10, l0\_.name AS name\_11, l0\_.description AS description\_12, l0\_.alias AS alias\_13, l0\_.public\_name AS public\_name\_14, l0\_.filters AS filters\_15, l0\_.is\_global AS is\_global\_16, l0\_.is\_preference\_center AS is\_preference\_center\_17, l0\_.last\_built\_date AS last\_built\_date\_18, l0\_.category\_id AS category\_id\_19 FROM lead\_lists l0\_ LEFT JOIN categories c1\_ ON l0\_.category\_id = c1\_.id ORDER BY l0\_.name ASC’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l0\_.last\_built\_date’ in ‘field list’ (uncaught exception) at /home/agwmadmin/mas.agwm.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 79 while running console command `mautic:segments:update`    
[2022-03-01 16:03:02] mautic.WARNING: Command `mautic:segments:update` exited with status code 1

**Your problem**  
_My problem is_ :

After the update, I get this email every time the cronjob "console mautic:segments:update  
" is executed

In AbstractMySQLDriver.php line 79:

An exception occurred while executing ‘SELECT l0\_.is\_published AS is\_publis  
hed\_0, l0\_.date\_added AS date\_added\_1, l0\_.created\_by AS created\_by\_2, l0\_.  
created\_by\_user AS created\_by\_user\_3, l0\_.date\_modified AS date\_modified\_4,  
l0\_.modified\_by AS modified\_by\_5, l0\_.modified\_by\_user AS modified\_by\_user  
_6, l0_.checked\_out AS checked\_out\_7, l0\_.checked\_out\_by AS checked\_out\_by\_  
8, l0\_.checked\_out\_by\_user AS checked\_out\_by\_user\_9, l0\_.id AS id\_10, l0\_.n  
ame AS name\_11, l0\_.description AS description\_12, l0\_.alias AS alias\_13, l  
0\_.public\_name AS public\_name\_14, l0\_.filters AS filters\_15, l0\_.is\_global  
AS is\_global\_16, l0\_.is\_preference\_center AS is\_preference\_center\_17, l0\_.l  
ast\_built\_date AS last\_built\_date\_18, l0\_.category\_id AS category\_id\_19 FRO  
M lead\_lists l0\_ LEFT JOIN categories c1\_ ON l0\_.category\_id = c1\_.id ORDER  
BY l0\_.name ASC’:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l0\_.last\_built\_date  
’ in ‘field list’

In Exception.php line 18:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l0\_.last\_built\_date  
’ in ‘field list’

In PDOConnection.php line 132:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l0\_.last\_built\_date  
’ in ‘field list’

mautic:segments:update [-b|–batch-limit [BATCH-LIMIT]] [-m|–max-contacts [MAX-CONTACTS]] [-i|–list-id [LIST-ID]] [-tm|–timing [TIMING]] [–bypass-locking] [-t|–timeout TIMEOUT] [-x|–lock\_mode LOCK\_MODE] [-f|–force] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–]

_Steps I have tried to fix the problem_ :

Please advise how to fix it

Thank you

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [March 1, 2022, 4:30pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/2 "2022-03-01T16:30:07Z")

</div>

Hi there,

How did you do the update? Did you have any errors or problems?

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [March 1, 2022, 4:33pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/3 "2022-03-01T16:33:19Z")

</div>

I updated through the alert notification in admin area. I noticed that when it got to the part where it said something about cache during the update then it paused for a long time there. The spinning stopped spinning.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [March 1, 2022, 4:35pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/4 "2022-03-01T16:35:53Z")

</div>

Right - @tobsowo had a similar problem. Other than the usual ‘don’t update in the browser’ message, here’s what helped him:

1. Clear the cache by deleting the cache folder
2. Follow these steps:

> **[Mautic update failed - how to recover](https://docs.mautic.org/en/troubleshooting/update-failed)**
>
> . Sometimes when updating Mautic, the process might stall or fail part way through. This can cause a problem, because it can cause Mautic to be inbetween two versions and often this can make the system unusable.. . . . . . Generally speaking, updates...

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [March 1, 2022, 4:51pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/5 "2022-03-01T16:51:37Z")

</div>

Using ssh following the instruction on the page.

First step give me this error in command line

// Clearing the cache for the prod environment with debug  
// false

In SalesforceIntegration.php line 1380:

Error: Allowed memory size of 100663296 bytes exhausted (tried to allocate  
32768 bytes)

cache:clear [–no-warmup] [–no-optional-warmers] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–]

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [March 1, 2022, 4:54pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/6 "2022-03-01T16:54:00Z")

</div>

I skipped on ahead and deleted the cache then doing the next steps now …

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [March 1, 2022, 4:56pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/7 "2022-03-01T16:56:02Z")

</div>

Clearing the cache error above suggests running out of memory while processing the task. So maybe the server’s php limits need to be increased 🙂

---

<div class="post-metadata">

**Author:** ![tobsowo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tobsowo/32/3096_2.png) [@tobsowo](https://forum.mautic.org/u/tobsowo)\
**Post date:** [March 1, 2022, 4:58pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/8 "2022-03-01T16:58:55Z")

</div>

Had a similar challenge and was about to solve it using the doc link shared above in the following steps:

1. Stop the update by refreshing your browser
2. Clear cache (I did this on the file manager and CLI)
3. Add this to your instance URL “/update/schema”
4. Go to your dashboard or try it using incognito

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [March 1, 2022, 5:10pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/9 "2022-03-01T17:10:06Z")

</div>

Memory limit is already set to 512M.

Most php script don’t even need more than 64M …

Are you saying that Mautic need more php memory?

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [March 1, 2022, 5:12pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/10 "2022-03-01T17:12:06Z")

</div>

I am at the step where I did php bin/console doctrine:migration:migrate …

It been 30 minutes and still processing … is this normal?

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [March 1, 2022, 5:30pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/11 "2022-03-01T17:30:34Z")

</div>

Thanks … we resume the cronjob and so far no errors after doing both @silavapi and your suggestions to fix this issue.

We may go ahead and trash this Mautic install since we installed it when 4.0 first came out last year and we really haven’t made the move over to it yet due to bugs we keep discovering on it so our are still in a “testing” stage.

Our first install was done via zip file and now with new Marketplace which require composer install so we are checking to see if composer would work alongside with cPanel and reinstall Mautic using composer instead.

We really want to start using Mautic but kept running into bugs or missing features especially in the grapejs editor area so we been holding it off for now until most of bug eliminated or missing features added in.

---

<div class="post-metadata">

**Author:** ![tobsowo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tobsowo/32/3096_2.png) [@tobsowo](https://forum.mautic.org/u/tobsowo)\
**Post date:** [March 1, 2022, 5:56pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/12 "2022-03-01T17:56:37Z")

</div>

With Composer I guess most of what you’ve been looking for would have been available.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [March 1, 2022, 6:19pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/13 "2022-03-01T18:19:56Z")

</div>

That may not be the PHP limit that your command line is using. Often they have different limits to the web folder.

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [March 1, 2022, 8:24pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/14 "2022-03-01T20:24:41Z")

</div>

I just installed composer on my server and did a fresh install on a unused domain to test it out. Seems to work fine.

Can the zip mautic be completely deleted and composer mautic install in it place but use the same database or I have to start fresh if I switch over to composer?

It no big loss but just having to reconfigured everything especially with AWS account is time comsuming.

Thanks

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [March 1, 2022, 8:26pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/15 "2022-03-01T20:26:20Z")

</div>

It’s the server php.ini what I call it and I am already aware that it applies to CLI. I checked … it was set at 128M so I increased it to 512M.

Thank you

---

<div class="post-metadata">

**Author:** ![mneumann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mneumann/32/2512_2.png) [@mneumann](https://forum.mautic.org/u/mneumann)\
**Post date:** [March 3, 2022, 5:45pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/16 "2022-03-03T17:45:10Z")

</div>

I had a similar problem. Running console doctrine:migration:migrate  
did the trick.  
By the way, it is the first time I am running into problems updating from the web interface. I wonder whether there are some issues in the 4.2 update routine.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [March 7, 2022, 9:58am UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/17 "2022-03-07T09:58:16Z")

</div>

We made a lot of changes in 4.2, so entirely possible. Of note is that we will be fully removing the ability to update in the user interface in Mautic 5. Read more here: [Important changes to the Mautic install and upgrade process](https://www.mautic.org/blog/community/important-changes-mautic-install-and-upgrade-process).

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [May 26, 2022, 12:52pm UTC](https://forum.mautic.org/t/error-after-upgrading-to-4-2-clearing-cache-fails-and-error-unknown-column-last-built-date-in-field-list/22866/18 "2022-05-26T12:52:52Z")

</div>

A post was split to a new topic: [Problems with failed web update](https://forum.mautic.org/t/problems-with-failed-web-update/24225)
