# SQLSTATE\[42S22\]: Column not found: 1054 Unknown column 'primarycompany' in 'field list'

**URL:** https://forum.mautic.org/t/sqlstate-42s22-column-not-found-1054-unknown-column-primarycompany-in-field-list/7047
**Category:** Product Support
**Created:** [January 4, 2017, 7:05pm UTC](https://forum.mautic.org/t/sqlstate-42s22-column-not-found-1054-unknown-column-primarycompany-in-field-list/7047 "2017-01-04T19:05:33Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![DerekBuntin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/derekbuntin/32/90_2.png) [@DerekBuntin](https://forum.mautic.org/u/DerekBuntin)
#### Post date: [January 4, 2017, 7:05pm UTC](https://forum.mautic.org/t/sqlstate-42s22-column-not-found-1054-unknown-column-primarycompany-in-field-list/7047/1 "2017-01-04T19:05:33Z")

</div>

It seems the schema is not correct but I have updated the scheme by trying to visit update/schema, which tells me it’s already up to date.  
  
  
  
Any ideas where the column should exist?

---

<div class="post-metadata">

### Author: ![DerekBuntin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/derekbuntin/32/90_2.png) [@DerekBuntin](https://forum.mautic.org/u/DerekBuntin)
#### Post date: [January 4, 2017, 7:05pm UTC](https://forum.mautic.org/t/sqlstate-42s22-column-not-found-1054-unknown-column-primarycompany-in-field-list/7047/2 "2017-01-04T19:05:33Z")

</div>

It seems the schema is not correct but I have updated the scheme by trying to visit update/schema, which tells me it’s already up to date.

Any ideas where the column should exist?

---

<div class="post-metadata">

### Author: ![gigcity](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gigcity/32/104_2.png) [@gigcity](https://forum.mautic.org/u/gigcity)
#### Post date: [April 9, 2017, 4:39am UTC](https://forum.mautic.org/t/sqlstate-42s22-column-not-found-1054-unknown-column-primarycompany-in-field-list/7047/3 "2017-04-09T04:39:43Z")

</div>

@DerekBuntin how did you get this resolved? I’m seeing a similar issue on my instance.

---

<div class="post-metadata">

### Author: ![DerekBuntin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/derekbuntin/32/90_2.png) [@DerekBuntin](https://forum.mautic.org/u/DerekBuntin)
#### Post date: [April 9, 2017, 6:43am UTC](https://forum.mautic.org/t/sqlstate-42s22-column-not-found-1054-unknown-column-primarycompany-in-field-list/7047/4 "2017-04-09T06:43:21Z")

</div>

@gigcity I honestly cannot remember and unsure why I never posted a fix here because I normally would have, sorry I can’t be of more assistance.

Have you tried forcing a schema update via SSH?

---

<div class="post-metadata">

### Author: ![gigcity](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gigcity/32/104_2.png) [@gigcity](https://forum.mautic.org/u/gigcity)
#### Post date: [April 9, 2017, 7:24am UTC](https://forum.mautic.org/t/sqlstate-42s22-column-not-found-1054-unknown-column-primarycompany-in-field-list/7047/5 "2017-04-09T07:24:53Z")

</div>

@DerekBuntin - I have. My 2.7.1 install is working but calls to “app/console mautic:campaigns:trigger” cause sql errors. I also have a few curious sql errors in my log still. It seems that everything is working except for Campaigns.

---

<div class="post-metadata">

### Author: ![DerekBuntin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/derekbuntin/32/90_2.png) [@DerekBuntin](https://forum.mautic.org/u/DerekBuntin)
#### Post date: [April 9, 2017, 10:28am UTC](https://forum.mautic.org/t/sqlstate-42s22-column-not-found-1054-unknown-column-primarycompany-in-field-list/7047/6 "2017-04-09T10:28:41Z")

</div>

@gigcity I’m pretty sure there was a fix for this and I can’t quite remember what it was, do you get any issues or errors relating to the php memory limit?

---

<div class="post-metadata">

### Author: ![gigcity](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gigcity/32/104_2.png) [@gigcity](https://forum.mautic.org/u/gigcity)
#### Post date: [April 9, 2017, 4:11pm UTC](https://forum.mautic.org/t/sqlstate-42s22-column-not-found-1054-unknown-column-primarycompany-in-field-list/7047/7 "2017-04-09T16:11:42Z")

</div>

@DerekBuntin The fixes that I’ve seen so far have to do with form-based campaigns as opposed to segment based campaigns.

I don’t have any php memory limit issues. That’s a pretty easy fix in php.ini. Do you need assistance with fixing a memory limit issue?

---

<div class="post-metadata">

### Author: ![DerekBuntin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/derekbuntin/32/90_2.png) [@DerekBuntin](https://forum.mautic.org/u/DerekBuntin)
#### Post date: [April 9, 2017, 4:57pm UTC](https://forum.mautic.org/t/sqlstate-42s22-column-not-found-1054-unknown-column-primarycompany-in-field-list/7047/8 "2017-04-09T16:57:31Z")

</div>

@gigcity no I don’t have any issues, sorry I can’t be of more help with your sql problem, I’m sure this happened after I updated the system and I’m pretty sure there was a fix for it released soon after an update, maybe check the update logs.
