Open-AudIT
https://www.open-audit.org/phpBB3/

error when update 1.8.4 to 1.12.10
https://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=6585
Page 1 of 1

Author:  batist3 [ Sun Feb 05, 2017 5:21 am ]
Post subject:  error when update 1.8.4 to 1.12.10

Hi,

I try to update my database from 1.8.4 to 1.12.10

A few second after the start of the update, i get an error :

[quote]Error Number: 1005

Can't create table 'auditv2.graph' (errno: 150)

CREATE TABLE `graph` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `system_id` int(10) unsigned DEFAULT NULL, `linked_table` varchar(100) NOT NULL DEFAULT '', `linked_row` varchar(100) NOT NULL DEFAULT '', `type` enum('disk','partition','directory','file','database','share','other') NOT NULL DEFAULT 'partition', `used_percent` tinyint unsigned NOT NULL DEFAULT '0', `free_percent` tinyint unsigned NOT NULL DEFAULT '0', `used` int unsigned NOT NULL DEFAULT '0', `free` int unsigned NOT NULL DEFAULT '0', `size` int unsigned NOT NULL DEFAULT '0', `timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), KEY `system_id` (`system_id`), CONSTRAINT `sys_hw_graph_system_id` FOREIGN KEY (`system_id`) REFERENCES `system` (`system_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8

Filename: controllers/admin.php

Line Number: 4551

Thank you in advance for your help.

Author:  jpa [ Tue Feb 07, 2017 2:32 am ]
Post subject:  Re: error when update 1.8.4 to 1.12.10

You will need to roll back to version 1.8.4.

After that I'm not much of a DB admin. You're getting a referential integrity error when creating the GRAPH table. There can be many reasons for this.

Author:  Mark [ Tue Feb 07, 2017 7:45 am ]
Post subject:  Re: error when update 1.8.4 to 1.12.10

That's part of the 1.10 upgrade. Run the program upgrade and BEFORE you do the database upgrade, in the file /usr/local/open-audit/code_igniter/application/controllers/admin.php (Linux) or c:\xampplite\open-audit\code_igniter\application\controllers\admin.php (Windows), add the following line: [code]$sql[] = "DROP TABLE IF EXISTS graph";[/code]
Add it after the line: [code]$sql[] = "DROP TABLE IF EXISTS sys_hw_graph";[/code]
I'm assuming that line number is correct, but defer to the actual second line of code. Find that and add the new line after it. Then run the database upgrade.

PS - This usually happens when the database upgrade has been run a second time. If that's the case and it was because of another error, that error will likely happen again. Feel free to zip and email me a copy of the database (should be made when the upgrade routine is run). The original backup from the first attempt. Likely the backup with the earliest timestamp. Send it to open-audit@opmantek.com and I'll work through it and send it back ready to go. That level of support is normally reserved for paying customers :-) If you can't send me the database, post the error (if it occurs again).

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/