# New Install - Database incomplete & can't migrate

**URL:** <https://forum.mautic.org/t/new-install-database-incomplete-cant-migrate/32330>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [June 11, 2024, 2:26pm UTC](https://forum.mautic.org/t/new-install-database-incomplete-cant-migrate/32330 "2024-06-11T14:26:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![steveb85as](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@steveb85as](https://forum.mautic.org/u/steveb85as)\
**Post date:** [June 11, 2024, 2:26pm UTC](https://forum.mautic.org/t/new-install-database-incomplete-cant-migrate/32330/1 "2024-06-11T14:26:01Z")

</div>

**Your software**  
My Mautic version is:5.0.4  
My PHP version is:8.1  
My Database type and version is:  
tried BOTH mysql 8.1 and 5.7

**Your problem**  
My problem is:  
Fresh install, the install works great, (installing on docker) as soon as I do thorough testing, which requires a reboot of the mautic container, there is a database connection issue, logs show missing tables, and columns, a list of available migrations shows a long list, but any attempt to migrate results in failures in all directions, this is with fresh installs with or without any data.  
These errors are showing in the log:

[2024-06-11T14:23:58.617668+00:00] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\TableNotFoundException: “An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘marketing.plugin\_integration\_settings’ doesn’t exist” at /var/www/html/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php line 49 {“exception”:“[object] (Doctrine\DBAL\Exception\TableNotFoundException(code: 1146): An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘marketing.plugin\_integration\_settings’ doesn’t exist at /var/www/html/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:49)\n[previous exception] [object] (Doctrine\DBAL\Driver\PDO\Exception(code: 1146): SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘marketing.plugin\_integration\_settings’ doesn’t exist at /var/www/html/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:28)\n[previous exception] [object] (PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘marketing.plugin\_integration\_settings’ doesn’t exist at /var/www/html/vendor/doctrine/dbal/src/Driver/PDO/Statement.php:130)”} {“hostname”:“m2-64458978f5-8bnr4”,“pid”:41}  
[2024-06-11T14:23:58.691913+00:00] mautic.CRITICAL: Exception thrown when handling an exception (Mautic\CoreBundle\Exception\FileNotFoundException: blank not found! at /var/www/html/docroot/app/bundles/CoreBundle/Twig/Helper/ThemeHelper.php line 38) {“exception”:“[object] (Mautic\CoreBundle\Exception\FileNotFoundException(code: 0): blank not found! at /var/www/html/docroot/app/bundles/CoreBundle/Twig/Helper/ThemeHelper.php:38)”} {“hostname”:“m2-64458978f5-8bnr4”,“pid”:41}  
[2024-06-11T14:23:58.721762+00:00] mautic.ERROR: Mautic\CoreBundle\Exception\FileNotFoundException: blank not found! - in file /var/www/html/docroot/app/bundles/CoreBundle/Twig/Helper/ThemeHelper.php - at line 38 {“hostname”:“m2-64458978f5-8bnr4”,“pid”:41}

Steps I have tried to fix the problem:

tried both versions of php, tried every way i can with migration on the database.

---

<div class="post-metadata">

**Author:** ![steveb85as](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@steveb85as](https://forum.mautic.org/u/steveb85as)\
**Post date:** [June 13, 2024, 8:47pm UTC](https://forum.mautic.org/t/new-install-database-incomplete-cant-migrate/32330/2 "2024-06-13T20:47:37Z")

</div>

to help someone else in future?

run these commands on reboot of the container

php /var/www/html/bin/console doctrine:cache:clear-metadata

php /var/www/html/bin/console doctrine:cache:clear-query

php /var/www/html/bin/console doctrine:cache:clear-result
