Mautic: MySQL error on update

Created on 28 Feb 2018  路  3Comments  路  Source: mautic/mautic

What type of report is this:

| Q | A
| ---| ---
| Bug report? | Y
| Feature request? | N
| Enhancement? | N

Description:

Install the update through SSH and follow these steps: https://johnlinhart.com/blog/uh-oh-mautic-upgrade-was-not-successful
The frontend works after the update but the mysql error remains.

If a bug:

| Q | A
| --- | ---
| Mautic version | 2.2.12
| PHP version | 7.0.27
|MySQL version| 10.0.29-MariaDB-cll-lve - MariaDB Server

Steps to reproduce:

  1. install the update through SSH and follow these steps: https://johnlinhart.com/blog/uh-oh-mautic-upgrade-was-not-successful

Log errors:

$ php app/console doctrine:schema:update --dump-sql
ALTER TABLE mat_tweets CHANGE text text VARCHAR(280) NOT NULL;

$ php app/console doctrine:schema:update --force
Updating database schema...
[Doctrine\DBAL\Exception\DriverException]
An exception occurred while executing 'ALTER TABLE mat_tweets CHANGE text text VARCHAR(280) NOT NULL':
SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes.
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes.
[PDOException]
SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes.

Most helpful comment

"innodb_large_prefix" must be enabled and the default for "innodb_file_format" must be BARRACUDA in your MySQL/MariaDB config.

After making those changes and restarting the database server, the ROW_FORMAT for that table must be set to either COMPRESS or DYNAMIC (example: "ALTER TABLE mat_tweets ROW_FORMAT=DYNAMIC;")

Then, perform "./console doctrine:migrations:migrate -n".

All 3 comments

"innodb_large_prefix" must be enabled and the default for "innodb_file_format" must be BARRACUDA in your MySQL/MariaDB config.

After making those changes and restarting the database server, the ROW_FORMAT for that table must be set to either COMPRESS or DYNAMIC (example: "ALTER TABLE mat_tweets ROW_FORMAT=DYNAMIC;")

Then, perform "./console doctrine:migrations:migrate -n".

Thanks @MxyzptlkFishStix , worked perfect! The server was configed correctly. I just had to run the ALTER TABLE mat_tweets ROW_FORMAT=DYNAMIC query.

Had the same issue and the same solution - Simply had to run the ALTER TABLE tweets ROW_FORMAT=DYNAMIC query.

Thanks a load @MxyzptlkFishStix

Was this page helpful?
0 / 5 - 0 ratings