error upgrading database
Problem reported by Poin Dexter - November 15, 2016 at 3:08 AM
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):
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

3 Replies

Reply to Thread
Any kind of help would be greatly appreciated. Anything at all.
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
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:
161117 17:35:39 Error in dropping of a foreign key constraint of table "smartertrack_bts"."st_timelogs",
in SQL command
  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