# Table or view doesn't exists

**URL:** <https://forum.mautic.org/t/table-or-view-doesnt-exists/3645>\
**Category:** Development\
**Created:** [May 5, 2016, 4:55am UTC](https://forum.mautic.org/t/table-or-view-doesnt-exists/3645 "2016-05-05T04:55:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anton\_G](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@Anton\_G](https://forum.mautic.org/u/Anton_G)\
**Post date:** [May 5, 2016, 4:55am UTC](https://forum.mautic.org/t/table-or-view-doesnt-exists/3645/1 "2016-05-05T04:55:12Z")

</div>

Hello, can you help me with my issue. I get error  
  
  
  
An exception occurred while executing ‘SELECT f.alias, f.is\_unique\_identifer as is\_unique FROM lead\_fields f ORDER BY f.field\_order ASC’:  
  
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘lead\_fields’ doesn’t exist  
  
  
  
when I try to run mautic:install:data command in console.  
  
  
  
Also I get it on doctrine:schema:update  
  
Table exists in database and script is working in browser. But I need to get it works in console too.

---

<div class="post-metadata">

**Author:** ![Anton\_G](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@Anton\_G](https://forum.mautic.org/u/Anton_G)\
**Post date:** [May 5, 2016, 4:55am UTC](https://forum.mautic.org/t/table-or-view-doesnt-exists/3645/2 "2016-05-05T04:55:12Z")

</div>

Hello, can you help me with my issue. I get error

An exception occurred while executing ‘SELECT f.alias, f.is\_unique\_identifer as is\_unique FROM lead\_fields f ORDER BY f.field\_order ASC’:  
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘lead\_fields’ doesn’t exist

when I try to run mautic:install:data command in console.

Also I get it on doctrine:schema:update  
Table exists in database and script is working in browser. But I need to get it works in console too.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [May 5, 2016, 12:17pm UTC](https://forum.mautic.org/t/table-or-view-doesnt-exists/3645/3 "2016-05-05T12:17:49Z")

</div>

Can you describe what is your goal? The mautic:install:data command was not updated for a long time.

---

<div class="post-metadata">

**Author:** ![Anton\_G](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@Anton\_G](https://forum.mautic.org/u/Anton_G)\
**Post date:** [May 5, 2016, 2:46pm UTC](https://forum.mautic.org/t/table-or-view-doesnt-exists/3645/4 "2016-05-05T14:46:35Z")

</div>

I need to have ability of CLI installation of Mautic platform(I am developer too). So I need to create some fake data from CLI.  
Even if I install system from browser - it works fine, but in CLI with doctrine:schema:update for example I get same error.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [May 6, 2016, 7:22am UTC](https://forum.mautic.org/t/table-or-view-doesnt-exists/3645/5 "2016-05-06T07:22:35Z")

</div>

What error? What do you get when you execute `app/console doctrine:schema:update --dump-sql` ?

---

<div class="post-metadata">

**Author:** ![Anton\_G](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@Anton\_G](https://forum.mautic.org/u/Anton_G)\
**Post date:** [May 6, 2016, 1:39pm UTC](https://forum.mautic.org/t/table-or-view-doesnt-exists/3645/6 "2016-05-06T13:39:29Z")

</div>

For this command output is

`ALTER TABLE leads CHANGE email email VARCHAR(255) DEFAULT NULL, CHANGE country country VARCHAR(255) DEFAULT NULL;
CREATE INDEX lead_fieldemail_search ON leads (email);
CREATE INDEX lead_fieldcountry_search ON leads (country);`  
And after that command I execute app/console mautic:install data and get

[code]An exception occurred while executing ‘SELECT f.alias, f.is\_unique\_identifer as is\_unique FROM lead\_fields f ORDER BY f.field\_order ASC’:

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘lead\_fields’ doesn’t exist[/code]

---

<div class="post-metadata">

**Author:** ![Anton\_G](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@Anton\_G](https://forum.mautic.org/u/Anton_G)\
**Post date:** [May 10, 2016, 10:11am UTC](https://forum.mautic.org/t/table-or-view-doesnt-exists/3645/7 "2016-05-10T10:11:59Z")

</div>

Pleasse can help me with this issue?

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [May 10, 2016, 10:25am UTC](https://forum.mautic.org/t/table-or-view-doesnt-exists/3645/8 "2016-05-10T10:25:17Z")

</div>

My only advice I can think of is to install Mautic with via the browser step by step installation and then don’t run the install command.
