AnsweredAssumed Answered

Differences found between database and vardefs

Question asked by Merrick Dennis on Jul 13, 2016
Latest reply on Jul 13, 2016 by jsmith

Hello, I'm still running 6.5.x Professional.  Working on cleaning up remaining issues in my on-site deploy before upgrading.  I've asked this question before but never received an answer:

 

When running a quick repair and rebuild I receive a message saying there are differences found between the database and vardefs and it provides the following script to run to sync the two.  When

/* Table : campaigns */
/*COLUMNS*/
/*MISMATCH WITH DATABASE - tracker_key -  ROW [name] => 'tracker_key'  [type] => 'int'  [len] => '11'  [auto_increment] => '1'  [required] => 'true'  */
/* VARDEF - tracker_key -  ROW[name] => 'tracker_key'  [vname] => 'LBL_TRACKER_KEY'  [type] => 'int'  [required] => ''  [studio] => 'Array'  [len] => '11'  [auto_increment] => '1'  [comment] => 'The internal ID of the tracker used in a campaign; no longer used as of 4.2 (see campaign_trkrs)'  [calculated] => ''  [enable_range_search] => ''  [autoinc_next] => '473'  [dbType] => 'int'  */
/* INDEXES */
ALTER TABLE campaigns   modify COLUMN tracker_key int(11)  NOT NULL auto_increment;

 

Executing the script from within the repair screen appears to work as Sugar states that the database tables are synced with vardefs.  Running another quick repair yields the same message as noted above and it says I need to run the script.  I have logged in to MySQL as root from the command line and run the SQL statement that Sugar provides:

 

mysql> ALTER TABLE campaigns   modify COLUMN tracker_key int(11)  NOT NULL auto_increment;
Query OK, 0 rows affected (0.00 sec)
Records: 0  Duplicates: 0  Warnings: 0

 

Sugar still states that there are differences between the vardefs and the database when running a quick repair and rebuild.   How can I resolve this issue so that Sugar stops complaining about a difference between the vardefs and the database?

 

Thanks.

Outcomes