error upgrading database
Problem reported by Poin Dexter - November 15, 2016 at 3:08 AM
Submitted
I'm in the middle of performing an upgrade of SmarterTrack (7.5.x to 12.x). After installing the new ST and launching the landing page the upgrade wizards starts but stops with the following error message (and yes, the  database engine for all the tables is InnoDB):
 
[Management.Settings.frmDatabaseWizard_ErrorExecuting]
 
Can't DROP 'FK_st_TimeLogs_st_TimeLogCategories'; check that column/key exists
 
Problem: Can't DROP 'FK_st_TimeLogs_st_TimeLogCategories'; check that column/key exists
 
Please advise

4 Replies

Reply to Thread
0
Poin Dexter Replied
Any kind of help would be greatly appreciated. Anything at all.
0
Rod Lasky Replied
Employee Post
Hi Poin.  I just tested a local upgrade from SmarterTrack 7 to version 12 (with mySQL), and encountered no errors.  I would recommend submitting a support ticket so that we can take a further look into this.
Rod Lasky
Technical Support Specialist
SmarterTools Inc.
(877) 357-6278
www.smartertools.com
0
Poin Dexter Replied
This must be a bug that lies within SmarterTrack NOT my SmarterTrack installation (especially since I haven't done anything custom to it) - I don't think it's fair I have to pay $50 for the privilege to point out a bug and get support to troubleshoot something that's clearly out of my hands. The upgrade wizard script (which comes packaged with the version of ST I'm trying to upgrade to) is mistakenly combining tables 'st_TimeLogs' and 'st_TimeLogCategories' to make 'FK_st_TimeLogs_st_TimeLogCategories' which obviously does not exist. That doing can only exist in the upgrade script's code. To further troubleshoot, as I assumed the 7.5.x to 12.3.x version jump was too big, I downloaded all previous versions of ST to upgrade to each major version incrementally and upon the 7.8.x to 8.x upgrade I got the same exact error as above.

Please advise.
0
Poin Dexter Replied
Further troubleshooting... I tried upgrading this same working ST 7.8.x installation to 8.6.x on another server (Server 2003, IIS 6.0, MySQL 5.5.11, the original server in question is Server 2016 Essentials, IIS 10, MySQL 5.7.x) and essentially got the same error message when SmarterTrack 8.6.x's database upgrade wizard ran: 
 
Error executing the following:
Error on rename of '.\smartertrack_bts\st_timelogs' to '.\smartertrack_bts\#sql2-112c-11' (errno: 152)
Problem: Error on rename of '.\smartertrack_bts\st_timelogs' to '.\smartertrack_bts\#sql2-112c-11' (errno: 152)
 
 
I checked the database's last foreign key error (using MySQL command SHOW ENGINE INNODB STATUS;) and it again indicates that erroneous table:
 
------------------------
LATEST FOREIGN KEY ERROR
------------------------
161117 17:35:39 Error in dropping of a foreign key constraint of table "smartertrack_bts"."st_timelogs",
in SQL command
ALTER TABLE st_TimeLogs
  DROP FOREIGN KEY `FK_st_TimeLogs_st_TimeLogCategories`
Cannot find a constraint with the given id "FK_st_TimeLogs_st_TimeLogCategories".
InnoDB: Renaming table `smartertrack_bts`.`st_timelogs` to `smartertrack_bts`.<result 2 when explaining filename '#sql2-112c-11'> failed!
 
 
Please advise

Reply to Thread