Ticket #6103 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

Table vtiger_user_module_preferences missing after upgrade from 5.0.4 to 5.1

Reported by: brett.hooker Assigned to: developer
Priority: major Milestone: 5.1.0
Component: vtigercrm Version: 5.1.0-val2
Keywords: Cc:

Description

Upgraded from 5.0.4 to 5.1

Error opening any list view: Fatal error: Uncaught exception 'Exception' with message 'result is not an object' in /home/editshar/public_html/include/database/PearDatabase.php:788 Stack trace: #0 /home/editshar/public_html/modules/CustomView/CustomView.php(161): PearDatabase?->query_result(false, 0, 'default_cvid') #1 /home/editshar/public_html/modules/Accounts/ListView.php(79): CustomView?->getCustomViewByCvid('65') #2 /home/editshar/public_html/modules/Accounts/index.php(53): include('/home/editshar/...') #3 /home/editshar/public_html/index.php(693): include('/home/editshar/...') #4 {main} thrown in /home/editshar/public_html/include/database/PearDatabase.php on line 788

Error caused by missing table vtiger_user_module_preferences

Don't know why this table was missing after the upgrade.

Might be related to: http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/5972

Change History

06/30/09 05:48:11 changed by brett.hooker

  • status changed from new to closed.
  • resolution set to wontfix.

I can confirm that the vtiger_tab table is indeed a MyISAM table.

Strange, as about half of the vtiger tables are MyISAM. The upgrade test is being performed on a 504 database. Don't know how the tables got to be MyISAM.

I ran ALTER TABLE vtiger_tab ENGINE=InnoDB; and then CREATE TABLE IF NOT EXISTS vtiger_user_module_preferences (userid int, tabid int, default_cvid int, primary key(userid, tabid), CONSTRAINT fk_1_vtiger_user_module_preferences FOREIGN KEY (userid) REFERENCES vtiger_users (id) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT fk_2_vtiger_user_module_preferences FOREIGN KEY (tabid) REFERENCES vtiger_tab (tabid) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;

and retested and the problem was fixed...

So, I just need to work out why my upgrade data has a bunch of MyISAM tables in it...

07/01/09 00:43:26 changed by asha

  • status changed from closed to reopened.
  • resolution deleted.

Hi Brett,

With older versions of Vtiger, Engine type was not explicitly specified for all the tables. If your mysql default engine was not set to InnoDB and is MyISAM, then all the tables created without specifying the engine would have been created with engine type MyISAM.

With new changes to Migration, we have added to support to check if there are any MyISAM tables and let the user to fix the engine type before proceeding with migration. (For the new changes to Migration - Please refer to the changeset [12906] )

07/01/09 00:44:06 changed by asha

  • status changed from reopened to closed.
  • resolution set to fixed.