Database Upgrade Hangs at 92%

Ask your questions regarding TimeTrex installation here.
Locked
pichie3001
Posts: 7
Joined: Wed Apr 24, 2013 3:53 am

Database Upgrade Hangs at 92%

Post by pichie3001 »

Hello,

I upgraded our Timetrex version from 5.0.8 to 5.3.3
I downloaded the manual installation/upgrade and uploaded the zip file to the timetrex folder on our web root. Then, I unzipped it there on top of the current installation. I followed the instructions from the README.TXT, and the installation run smoothly, until the database upgrading process, which stops at 92%

PHP Version 5.2.17
PostgreSQL 8.4.13


Upgrading database, please wait...

Debug Buffer
============================================================================
Memory Usage: 11927880 Buffer Size: 20
----------------------------------------------------------------------------
DEBUG [L0415] [14ms]: [Function](): URI: /timetrex3/interface/install/DatabaseSchema.php?external_installer= IP Address: 124.105.107.13
DEBUG [L0417] [14ms]: [Function](): Version: 5.3.3 Edition: 10 Production: 0 Demo Mode: 0
DEBUG [L0167] [278ms]: TTDate::setTimeZone(): Setting TimeZone: America/Denver
DEBUG [L0085] [618ms]: [Function](): Bypassing Authentication
DEBUG [L0438] [620ms]: TTi18n::chooseBestLocale(): Choosing Best Locale...
DEBUG [L0446] [620ms]: TTi18n::chooseBestLocale(): Using Language from cookie: en_US
DEBUG [L0351] [620ms]: TTi18n::setLocale(): Generated/Passed In Locale: en_US
DEBUG [L0287] [621ms]: TTi18n::generateLocale(): Array of Locales to try in order for "en_US": en_US,en_US.UTF-8,en,en.UTF-8
DEBUG [L0245] [621ms]: TTi18n::tryLocale(): Found valid locale: en_US
DEBUG [L0354] [621ms]: TTi18n::setLocale(): Attempting to set Locale(s) to: en_US Category: 6 Current Locale:
DEBUG [L0360] [621ms]: TTi18n::setLocale(): Setting currency/numeric Locale to: en_US
DEBUG [L0373] [625ms]: TTi18n::setLocale(): Setting translator to normalized locale: en_US
DEBUG [L0393] [625ms]: TTi18n::setLocale(): Set Master Locale To: en_US
DEBUG [L0511] [625ms]: TTi18n::chooseBestLocale(): Using Locale: en_US
DEBUG [L1649] [630ms]: Misc::detectMobileBrowser(): User Agent: Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101 Firefox/20.0 Retval:
DEBUG [L0110] [635ms]: Install::isInstallMode(): Install Mode is ON
DEBUG [L0360] [635ms]: Install::checkDatabaseExists(): Database Name: shoreclo_timetrex
DEBUG [L0370] [637ms]: Install::checkDatabaseExists(): Exists - Database Name: shoreclo_timetrex
DEBUG [L0402] [637ms]: Install::checkTableExists(): Table Name: company
DEBUG [L0412] [1119ms]: Install::checkTableExists(): Exists - Table Name: company
============================================================================

============================================================================
PROFILER OUTPUT
============================================================================
Calls Time Routine
-----------------------------------------------------------------------------
1 665.3290 ms (49.33 %) Main
16 271.6644 ms (20.14 %) __autoload
1 15.5578 ms (1.15 %) getEmptyRecordSet()
1 395.3450 ms (29.31 %) unprofiled

0.7801 ms (0.06 %) Missed
============================================================================
1348.6762 ms (100.00 %) OVERALL TIME
============================================================================
Please see attached timetrex log file. Any help will be much appreciated. Thanks!
Attachments
timetrex.log
(129.73 KiB) Downloaded 262 times
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Database Upgrade Hangs at 92%

Post by shaunw »

According to the log it would appear that you have manually modified the database and therefore broken the upgrade procedure.
DEBUG [L0078] [2485ms]: <b>Debug::Shutdown()</b>: PHP ERROR - FATAL(1): Uncaught exception 'ADODB_Exception' with message 'postgres7 error: [-1: ERROR: cannot drop table schedule_tmp because other objects depend on it<br>
DEBUG [L0078] [2485ms]: <b>Debug::Shutdown()</b>: DETAIL: view timesheet_totals depends on table schedule_tmp<br>
You have created a view called timesheet_totals which depends on a table TimeTrex is trying to remove, which of course failed. We don't recommend modifying the TimeTrex database whatsoever as it is pretty much guaranteed to cause you problems similar to this, or break whatever your custom changes are when table names, or column names change.

Instead you should be using the API to interact with the TimeTrex data to avoid these issues.
pichie3001
Posts: 7
Joined: Wed Apr 24, 2013 3:53 am

Re: Database Upgrade Hangs at 92%

Post by pichie3001 »

Hi Shaun,

Thank you very much!
I dropped all the views and repeated the upgrading process. It's now working without a fuss. :)
Locked