Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Thu Mar 28, 2024 9:21 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 22 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Tue Sep 20, 2016 9:57 pm 
Offline
Newbie

Joined: Wed Aug 31, 2016 11:10 pm
Posts: 5
Hello,
sorry for late answer.
Got new error on OAE-Linux-x86_64-release_1.12.8.2.1.run (upgrade from 1.12.6) database upgrade.

A Database Error Occurred
Error Number: 1054
Unknown column 'oa_user.user_full_name' in 'field list'
/* M_oa_config::load_config */ SELECT oa_config.*, oa_user.user_full_name FROM oa_config LEFT JOIN oa_user ON oa_config.config_edited_by = oa_user.user_id
Filename: models/m_oa_config.php
Line Number: 108


Please see attachment (database copy without data)


Attachments:
openaudit_no_data.sql.tar.gz [6.73 KiB]
Downloaded 473 times
Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 21, 2016 2:48 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
You'll get this error if your oa_config.internal_version is less than 20160409 but the oa_user table has had it's schema updated with new field names.

What value do you have in oa_config.internal_version?


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 21, 2016 11:47 pm 
Offline
Newbie

Joined: Wed Aug 31, 2016 11:10 pm
Posts: 5
Yes you are right:
internal_version 20150620
What should i do?


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 22, 2016 1:25 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
That is a difficult question as we don't know what state of upgrade your database is at right now. It's hard to fix a database where the upgrade routine broke mid-way. It's usually easiest to roll back to a backup, fix the upgrade routine and try upgrading up again. If you had support Opmantek would handle it for you.

What is your oa_config.display_version? internal_version "20150620" is display_version 1.8.2.

I would step through the SQL statements in the upgrade routine at line 3587 of application\controllers\admin.php and try to see where it stopped. Line 3749 is where the database internal_version is updated. Somewhere between 3587 and 3749 it stopped updating. You can compare your current schema against these to see where it stopped. For example line 3741 is "ALTER TABLE oa_group_sys DROP group_sys_type" so if your table oa_group_sys has a group_sys_type column then you know this step wasn't done.


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 22, 2016 3:46 pm 
Offline
Newbie

Joined: Wed Aug 31, 2016 11:10 pm
Posts: 5
Hello,
i have backup of machine with 1.12.6. Many time tried upgrade it to 1.2.8 to 1.2.8.1 (with sql_update from wiki), to 1.12.8.2. Always was error on DB upgrade (not same but ...)
In this time what is better way to upgrade from 1.12.6 to 1.12.8.x?


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 23, 2016 1:42 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
Roll back to 1.12.6 and then try to upgrade to the latest v1.12.8.2.1.

I don't know if this will fix it but earlier in the thread Mark (developer) indicated he had a customer with the same problem and found a fix for the next release. I don't know if that is in v1.12.8.2.1 but you can try and see what happens.


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 29, 2016 8:36 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
The fix will be in our next release. It's caused by having bad data in some of the tables. The system_id in the table is set to an id that doesn't exist in the system table. Any supported customers that have reported this have received a fix or direct help from me (as in a screen sharing session where I have fixed it for them). We give great support but you can understand we can't do this for free. That's a benefit of being a supported customer :-) If you're not a supported customer and not willing to become one and your database has bad data, I'm afraid you'll need to wait until the next release. Apologies.

Now having said that, I'll post the fix / code patch here but leave it to you to work it out for yourself.

[code] $tables = array('audit_log', 'bios', 'change_log', 'disk', 'dns', 'graph', 'ip', 'log', 'memory', 'module', 'monitor', 'motherboard', 'netstat', 'network', 'oa_group_sys', 'optical', 'pagefile', 'partition', 'print_queue', 'processor', 'route', 'san', 'scsi', 'server', 'server_item', 'service', 'share', 'software', 'software_key', 'sound', 'sys_man_additional_fields_data', 'sys_man_attachment', 'sys_man_notes', 'task', 'user', 'user_group', 'variable', 'video', 'vm', 'warranty', 'windows');
foreach ($tables as $table) {
if ($this->db->field_exists('system_id', $table)) {
$sql[] = "DELETE FROM `" . $table . "` WHERE `" . $table . "`.`system_id` NOT IN (SELECT system.id FROM system)";
}
}[/code]

_________________
Support and Development hours available from [url=https://opmantek.com]Opmantek[/url].
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 22 posts ]  Go to page Previous  1, 2

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 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:  
Powered by phpBB® Forum Software © phpBB Group