Open-AudIT

What's on your network?
It is currently Wed Jan 24, 2018 3:48 pm

All times are UTC + 10 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun Feb 05, 2017 5:21 am 
Offline
Newbie

Joined: Fri Apr 15, 2016 1:55 am
Posts: 1
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.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 07, 2017 2:32 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1229
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.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 07, 2017 7:45 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1935
Location: Brisbane, Australia
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";

Add it after the line:
Code:
$sql[] = "DROP TABLE IF EXISTS sys_hw_graph";

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).

_________________
Support and Development hours available from Opmantek.
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group