CDR Reports - Upgrade Error. to - ERR: SQLSTATE[42S21]: Column already exists

Updating one of our FreePBX boxes tonight night. (FreePBX 13.0.167)

Getting Error during Enable & Update Operation for ‘CDR Reprots’ module

ERR: SQLSTATE[42S21]: Column already exists 1060
Duplicate column name ‘cnum’

Tried uninstalling. Received Error


Upon reloading Module Admin ‘CDR Reports’ now show install option.


Tried installing. Fail. Same DB Error as above.

Any help is greatly appreciated.

Your machine is reporting an error when the install tries to query the cdr database. It’s probably corrupt.

Log into the machine as root and run this:

mysqlcheck -A --auto-repair

That’ll fix it.