Upgrading from timetrex 2.0.2 to 3.3.2

Ask your questions regarding TimeTrex installation here.
Locked
quepasa
Posts: 58
Joined: Thu Jun 21, 2007 11:16 am

Upgrading from timetrex 2.0.2 to 3.3.2

Post by quepasa »

I currently have TimeTrex version 2.0.2 and I made a copy of my database and directories in order to test an upgrade to the latest version (3.3.2).

The upgrade freezes at 46%. I set Debug Verbosity to 11 within the DatabaseSchema.php file, and looked at the output within the frame of the progress indicator. The install is failing at the following:
(mysqli): select company_id,user_id,section,name,value from permission where deleted = 0 order by company_id, user_id, section, name Query: select company_id,user_id,section,name,value from permission where deleted = 0 order by company_id, user_id, section, name failed. Unknown column 'company_id' in 'field list'
1054: Unknown column 'company_id' in 'field list'

ADOConnection._Execute(select company_id,user_id,section,name,value from permission where deleted = 0 order by company_id, user_id, section, name, false) % line 1012, file: adodb.inc.php
ADOConnection.Execute(select company_id,user_id,section,name,value from permission where deleted = 0 order by company_id, user_id, section, name) % line 58, file: InstallSchema_1014A.class.php
InstallSchema_1014A.preInstall() % line 168, file: InstallSchema_Base.class.php
InstallSchema_Base.InstallSchema() % line 0, file:
call_user_func_array(Array[2], Array[0]) % line 111, file: InstallSchema.class.php


Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysqli error: [1054: Unknown column 'company_id' in 'field list'] in adodb_throw(select company_id,user_id,section,name,value from permission where deleted = 0 order by company_id, user_id, section, name, ) ' in /var/www/html/time_new/classes/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /var/www/html/time_new/classes/adodb/adodb.inc.php(227): adodb_throw('mysqli', 'adodb_throw', 1054, 'Unknown column ...', 'select company_...', false, Object(ADODB_mysqli)) #1 /var/www/html/time_new/classes/adodb/adodb.inc.php(1037): ADODB_TransMonitor('mysqli', 'EXECUTE', 1054, 'Unknown column ...', 'select company_...', false, Object(ADODB_mysqli)) #2 /var/www/html/time_new/classes/adodb/adodb.inc.php(1012): ADOConnection->_Execute('select company_...', false) #3 /var/www/html/time_new/classes/modules/install/InstallSchema_1014A.class.php(58): ADOConnection->Execute('select company_...') #4 /var/www/html/time_new/classes/modules/install/InstallSchema_Base.class.php(168) in /var/www/html/time_new/classes/adodb/adodb-exceptions.inc.php on line 78
I looked at the permission table after the error, and it doesn't have a company_id or a user_id field. However, when I look at the pre-upgrade version of that table, those fields exist. After looking at the log file, I see that during the install, my original permission table was renamed permission_old, and the installer created a new table without those fields.

I also see in the log file the following error:
[3] => Unknown column 'level' in 'field list',[4] => select company_id,name,description,level,created_date,updated_date,id from permission_control where id = -1
Any suggestions? Should I upgrade to an earlier version first, and then to 3.3.2. I also don't mind editing the source code.

I have installed a copy of my log file, as well as a file containing the copy/paste of the text within the frame of the install progress indicator.
Thanks,

-Ben
Attachments
install_indicator_frame.txt
Text within the frame of the install progress indicator (stuck at 46%)
(5.68 KiB) Downloaded 259 times
timetrex.log
TimeTrex log file:
production = FALSE
enable = TRUE
enable_display = TRUE
buffer_output = TRUE
enable_log = TRUE
verbosity = 10
(314.84 KiB) Downloaded 288 times
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Upgrading from timetrex 2.0.2 to 3.3.2

Post by shaunw »

If you can restore to your previous backup of v2.0.2 and get it running again, I would recommend doing that, then upgrading to v2.2.22:

http://sourceforge.net/projects/timetre ... e/v2.2.22/

Once you have upgraded to v2.2.22 and everything is working, wait for v3.3.4 of TimeTrex before attempting to upgrade to that.

Its possible that you may be able to upgrade from v2.0.2 directly to v3.3.4 when its released, but we haven't tested it with anything older then v2.2.22.
quepasa
Posts: 58
Joined: Thu Jun 21, 2007 11:16 am

Re: Upgrading from timetrex 2.0.2 to 3.3.2

Post by quepasa »

Thanks for the reply. I tested the upgrade on a copy, so I don't need to restore anything.

Do you have an ETA for when 3.3.4 will be released?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Upgrading from timetrex 2.0.2 to 3.3.2

Post by shaunw »

I'm having our developers put together a beta test version of 3.3.4 for you and couple other customers in the same boat to test, it should be available later today if all goes well.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Upgrading from timetrex 2.0.2 to 3.3.2

Post by shaunw »

Here are the links to download the beta test version of 3.3.4:

http://www.timetrex.com/direct_download ... taller.exe
http://www.timetrex.com/direct_download ... taller.zip
http://www.timetrex.com/direct_download ... taller.bin
http://www.timetrex.com/direct_download ... v3.3.4.zip

It has been tested to upgrade versions as old as 2.2.22, but its possible that it may work as far back as v2.0.2.

Please give it a try and let us know how it goes.
dhananjay
Posts: 47
Joined: Thu Jan 20, 2011 2:28 pm

Re: Upgrading from timetrex 2.0.2 to 3.3.2

Post by dhananjay »

The Windows .exe download for 3.3.4 doesn't work. Tried multiple times.

Any other way to update the tax tables & calculations in the mean time?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Upgrading from timetrex 2.0.2 to 3.3.2

Post by shaunw »

What do you mean by doesn't work? Did you get any error?
quepasa
Posts: 58
Joined: Thu Jun 21, 2007 11:16 am

Re: Upgrading from timetrex 2.0.2 to 3.3.2

Post by quepasa »

I finally got the opportunity to test out the upgrades for 2.2.22 and 3.3.4

2.0.2 --> 3.3.4 : Upgrade failed at 46% with the same error that I got when I tried to upgrade to 3.3.2 (Unknown column 'company_id' in 'field list'])

2.0.2 --> 2.2.22 : Upgraded successfully without any errors, although I did experience a strange problem with timetrex not allowing me to login as admin (user/password failure). I looked at the users table and the admin's password had the same hash as before the upgrade. I just copied the password hash belonging to another password that I knew, and was able to login as admin. I'm not sure what caused this. The only unusual thing about the admin's password is that it has an '&' in it, and maybe the two versions of timetrex handle that character differently when calculating the hash.

2.0.2 --> 2.2.22 --> 3.3.4 : Upgrade failed at 81% with the following error
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysqli error: [1050: Table 'wage_group' already exists] in adodb_throw(CREATE TABLE wage_group ( id serial NOT NULL, company_id integer NOT NULL, name varchar(250), created_date integer, created_by integer, updated_date integer, updated_by integer, deleted_date integer, deleted_by integer, deleted smallint DEFAULT 0 NOT NULL ), ) ' in /var/www/html/time_new/classes/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /var/www/html/time_new/classes/adodb/adodb.inc.php(227): adodb_throw('mysqli', 'adodb_throw', 1050, 'Table 'wage_gro...', 'CREATE TABLE wa...', false, Object(ADODB_mysqli)) #1 /var/www/html/time_new/classes/adodb/adodb.inc.php(1037): ADODB_TransMonitor('mysqli', 'EXECUTE', 1050, 'Table 'wage_gro...', 'CREATE TABLE wa...', false, Object(ADODB_mysqli)) #2 /var/www/html/time_new/classes/adodb/adodb.inc.php(1012): ADOConnection->_Execute('CREATE TABLE wa...', false) #3 /var/www/html/time_new/classes/modules/instal in /var/www/html/time_new/classes/adodb/adodb-exceptions
I restored the 2.2.22 version of the database and verified that wage_group did NOT exist before I ran the 3.3.4 upgrade.

Let me know if you need more debug info. I created backups of the database and files at each stage, so it is easy for me to revert back to a previous version, enable debugging and re-run the upgrade.

One other thing. I am using MySQL v5.0.45. My 2.0.2 version of timetrex is using the legacy mysql driver. I notice that there is a mysqli driver that the install scripts want me to use. When I upgraded from 2.0.2 to 2.2.22 I kept the legacy mysql driver. However, when I went from 2.2.22 to 3.3.4 I set the script to use the mysqli driver. Also, my timetrex database has a combination of InnoDB and MyISAM tables. So, I am not sure if I should continue to use the legacy driver or the mysqli driver, and at what point I should change the drivers.

Thanks,
-Ben
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Upgrading from timetrex 2.0.2 to 3.3.2

Post by shaunw »

That is a strange error, can you provide the entire debug output where you got that error to put it more context? I don't understand why such an error would happen if the "wage_group" table didn't exist prior to the upgrade, as its only created once in the actual SQL files.

Regarding MySQL legacy driver and MySQLi, you should be able to switch to MySQLi at anytime, regardless of using MyISAM tables or not.
quepasa
Posts: 58
Joined: Thu Jun 21, 2007 11:16 am

Re: Upgrading from timetrex 2.0.2 to 3.3.2

Post by quepasa »

I found the error within the frame of the progress indicator, after I set Debug Verbosity to 11 within the DatabaseSchema.php file.

Attached is a copy/paste of all the text within the frame.

I double-checked again, and the wage_group table is not in my database when I restore version 2.2.22 of my backup. I then re-ran the install of 3.3.4, and the table is created (I can also tell using MySQL admin that the table has a creation/update time that corresponds to when I ran the 3.3.4 install script).

Thanks for the help.
Attachments
install_indicator_frame.txt
(7.42 KiB) Downloaded 246 times
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Upgrading from timetrex 2.0.2 to 3.3.2

Post by shaunw »

If that debug output is correct, it appears that your database is not properly in sync. It thinks your schema version is something that it is not.

Can you run this query from the MySQL console:

Code: Select all

select * from system_setting;
Copy and paste the exact output here.
quepasa
Posts: 58
Joined: Thu Jun 21, 2007 11:16 am

Re: Upgrading from timetrex 2.0.2 to 3.3.2

Post by quepasa »

This is the result for my live 2.0.2 system (I removed the value of the registration_key):
  • id name value
    1 schema_version_group_A 1013A
    2 tax_data_version 20070701.1
    3 tax_engine_version 1.0.5
    4 schema_version_group_T 1004T
    5 system_version 2.0.2
    6 update_notify 0
    7 anonymous_update_notify 0
    8 registration_key
    9 new_version 0
This is after upgrading to 2.2.22 (I removed the value of the registration_key):
  • id name value
    1 schema_version_group_A 1030A
    2 tax_data_version 20090501
    3 tax_engine_version 1.0.11
    4 schema_version_group_T 1010T
    5 system_version 2.2.22
    6 update_notify 0
    7 anonymous_update_notify 0
    8 registration_key
    9 new_version 0
Thanks for the help
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Upgrading from timetrex 2.0.2 to 3.3.2

Post by shaunw »

I just did another test upgrading from v2.2.22 running on MySQL to v3.3.4 and it worked flawlessly. So that leads me to believe that there is either a problem with your database or something out of the ordinary with your system/setup that is causing the problem.

I would recommend purchasing a support package from us so one of our support representatives can connect to your computer and troubleshoot the issue for you.
Locked