Is there a way to force database schema update?

Updating to v1.1.2, my site hangs on “Processing Database Updates”, and shows an “undefined” error. Refreshing browser seems to say update was successful, however when I try to edit an existing landing page I get “Uh oh! I think I broke it” message.

Log shows the following error:

Column not found: 1054 Unknown column ‘m0_.form_type’ in ‘field list’



So I was just wondering if there is an easy way to repair the database schema? I’m sure I could fix manually via phpMyAdmin, but was hoping there is an easy way :)

Updating to v1.1.2, my site hangs on “Processing Database Updates”, and shows an “undefined” error. Refreshing browser seems to say update was successful, however when I try to edit an existing landing page I get “Uh oh! I think I broke it” message.
Log shows the following error:
Column not found: 1054 Unknown column ‘m0_.form_type’ in ‘field list’

So I was just wondering if there is an easy way to repair the database schema? I’m sure I could fix manually via phpMyAdmin, but was hoping there is an easy way :slight_smile:

There’s a few commands available in the CLI which may help:

Runs the updater:
php app/console mautic:update:apply

Updates the database schema:
php app/console doctrine:schema:update --force

Hi Chad,
Thanks for the suggestion. I’m getting the following errors when I try to run these commands:

Fatal error: Class ‘SymfonyBundleTwigBundleTwigBundle’ not found in /public_html/app/AppKernel.php on line 184

Fatal error: Class ‘SymfonyBundleWebProfilerBundleWebProfilerBundle’ not found in /public_html/app/AppKernel.php on line 185

[InvalidArgumentException]
The file “/public_html/app/config/config_dev.php” does not exist

[SymfonyComponentDependencyInjectionExceptionServiceNotFoundException]
The service “templating” has a dependency on a non-existent service “templating.engine.twig”.

Any suggestion?

Hi Tuum

Did you install mautic using the downloaded installer or are you running from the source code via a .git install?

Hi Chad,
It’s the downloadable installer version, not the .git one. Are there some files in git I can copy to my site to make the cli commands work?