Child pages
  • 1.12.8.x error on database upgrade
Skip to end of metadata
Go to start of metadata

Restore your database. When you ran the installer, it creates a database backup. It should be in

Windows    c:\xampplite\open-audit\db_backup_TIMESTAMP.sql
Linux      ~/open-audit-backup-TIMESTAMP.tgz

You can restore it with the following commands (make sure to substitute the TIMESTAMP):


c:\xampplite\mysql\bin\mysql.exe -u openaudit -popenauditpassword -e "drop database openaudit; create database openaudit;"
c:\xampplite\mysql\bin\mysql.exe -u openaudit -popenauditpassword openaudit < c:\xampplite\open-audit\db_backup_TIMESTAMP.sql
cd /tmp
tar -xfz ~/open-audit-backup-TIMESTAMP.tgz
mysql -u openaudit -popenauditpassword -e "drop database openaudit; create database openaudit;"
mysql -u openaudit -popenauditpassword openaudit < ~/openaudit_backup.sql

Once that's done, you'll have your original database from before the upgrade. I have attached a file to this page called admin.php. Put it in to

Windows   c:\xampplite\open-audit\code_igniter\application\controllers\admin.php
Linux     /usr/local/open-audit/code_igniter/application/controllers/admin.php

You should then log on to Open-AudIT (Community) and it will prompt for the DB upgrade. It should now complete. If it does not, please advise ASAP.

FYI - The cause is orphaned rows in some tables that reference's that no longer exist. When we attempt to (re)create indexes on those tables it fails because there are no corresponding rows in the system table. The added code runs through the relevant tables and deletes any rows that exist and that reference a non-existing row in the system table.

Apologies for the inconvenience.


  • No labels