# Updating safely to 2.15.3

**URL:** https://forum.mautic.org/t/updating-safely-to-2-15-3/11337
**Category:** Product Support
**Created:** [October 9, 2019, 12:18pm UTC](https://forum.mautic.org/t/updating-safely-to-2-15-3/11337 "2019-10-09T12:18:04Z")
**Posts on this page:** 1
**Showing post:** 16

<div class="post-metadata">

### Author: ![virgilwashere](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/virgilwashere/32/554_2.png) [@virgilwashere](https://forum.mautic.org/u/virgilwashere)
#### Post date: [October 14, 2019, 1:29am UTC](https://forum.mautic.org/t/updating-safely-to-2-15-3/11337/16 "2019-10-14T01:29:56Z")

</div>

> [@silavapi](#):
>
> Have you cleared the cache manually by deleting app\>cache\>prod?

## finishing the upgrade

After running `console mautic:update:apply` you very much want to do a _hard_ `cache:clear` by deleting the `app/cache/prod` directory.

```console
$ rm -rf ./app/cache/prod
$ console cache:clear

```

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/79da23ece35161a6152a8c8fdfde19c669f6beb7.png)

```console
$ console --version
Mautic version 2.15.3 - app/prod

```

That should give you a working login page (`/s/login`), but check the database mappings and schema.

## database schema checks

### migration status

```console
$ console doctrine:migrations:status

 == Configuration

    >> Name: Mautic Migrations
    >> Database Driver: pdo_mysql
    >> Database Name: mauticuserdb
    >> Configuration Source: manually configured
    >> Version Table Name: migrations
    >> Version Column Name: version
    >> Migrations Namespace: Mautic\Migrations
    >> Migrations Directory: /var/www/mauticuser/mautic/app/migrations
    >> Previous Version: 2018-12-04 00:00:00 (20181204000000)
    >> Current Version: 2019-07-15 06:50:13 (20190715065013)
    >> Next Version: Already at latest version
    >> Latest Version: 2019-07-15 06:50:13 (20190715065013)
    >> Executed Migrations: 134
    >> Executed Unavailable Migrations: 0
    >> Available Migrations: 134
    >> New Migrations: 0

```

### schema validate ✅

```console
$ console doctrine:schema:validate
[Mapping] FAIL - The entity-class 'Mautic\DynamicContentBundle\Entity\DynamicContentLeadData' mapping is invalid:
* The association Mautic\DynamicContentBundle\Entity\DynamicContentLeadData#dynamicContent refers to the inverse side field Mautic\DynamicContentBundle\Entity\DynamicContent#id which is not defined as association.
* The association Mautic\DynamicContentBundle\Entity\DynamicContentLeadData#dynamicContent refers to the inverse side field Mautic\DynamicContentBundle\Entity\DynamicContent#id which does not exist.

[Mapping] FAIL - The entity-class 'Bazinga\OAuthServerBundle\Model\AccessToken' mapping is invalid:
* The field 'Bazinga\OAuthServerBundle\Model\AccessToken#expiresAt' uses a non-existant type 'int'.

[Mapping] FAIL - The entity-class 'Bazinga\OAuthServerBundle\Model\RequestToken' mapping is invalid:
* The field 'Bazinga\OAuthServerBundle\Model\RequestToken#expiresAt' uses a non-existant type 'int'.

[Database] FAIL - The database schema is not in sync with the current mapping file.

```

#### interpreting the results

- known issues 🐛
  - GitHub Issue [#5847](https://github.com/mautic/mautic/issues/5847)

  - GitHub Issue [#5848](https://github.com/mautic/mautic/issues/5848)

### schema update 🗃

```console
$ console doctrine:schema:update
ATTENTION: This operation should not be executed in a production environment.
           Use the incremental update to detect changes during development and use
           the SQL DDL provided to manually update your database in production.

The Schema-Tool would execute "29" queries to update the database.
Please run the operation by passing one - or both - of the following options:
    doctrine:schema:update --force to execute the command
    doctrine:schema:update --dump-sql to dump the SQL statements to the screen
$ console doctrine:schema:update --dump-sql

```

Most of these updates look like the plugin _ **MauticExtendedFieldBundle** _ is doing it’s job.  
eg: **`lead_fields_leads_<type>_xref`**

> **Sample SQL queries**
>
> ```sql
> ALTER TABLE campaign_events_timing ADD CONSTRAINT FK_3002A471F7E88B FOREIGN KEY (event_id) REFERENCES campaign_events (id) ON DELETE CASCADE;
> ALTER TABLE lead_fields_leads_boolean_xref ADD CONSTRAINT FK_C0A1940855458D FOREIGN KEY (lead_id) REFERENCES leads (id) ON DELETE CASCADE;
> ALTER TABLE lead_fields_leads_text_xref ADD CONSTRAINT FK_EA908229EE6485B3 FOREIGN KEY (lead_field_id) REFERENCES lead_fields (id) ON DELETE CASCADE;
> ALTER TABLE lead_fields_leads_time_xref ADD CONSTRAINT FK_4053F53155458D FOREIGN KEY (lead_id) REFERENCES leads (id) ON DELETE CASCADE;
> ALTER TABLE lead_fields_leads_time_xref ADD CONSTRAINT FK_4053F531EE6485B3 FOREIGN KEY (lead_field_id) REFERENCES lead_fields (id) ON DELETE CASCADE;
> ALTER TABLE lead_fields_leads_string_secure_xref ADD CONSTRAINT FK_6F66100A55458D FOREIGN KEY (lead_id) REFERENCES leads (id) ON DELETE CASCADE;
> 
> ```

Virgil  
🇦🇺

---

_[View the full topic](https://forum.mautic.org/t/updating-safely-to-2-15-3/11337)._
