Upgrade hangs at 97%
Posted: Fri Jan 18, 2013 1:58 pm
Hello,
I've encountered an install error while trying to upgrade. The upgrade is from version 5.0.8 to 5.2.3. I have also tried upgrading to 5.1.0 while troubleshooting but still receive the same error. This error is crucial, as the current version of timetrex we are on does not have the updated tax tables. We cannot pay our employees until this data is up to date. Current setup is:
- Ubuntu Desktop/Server 10.04 LTS (desktop for test environment, server for production)
- Apache v2.2.14
- MySQL v5.1.66
- PHP 5.3.2
Steps to upgrade:
1) Download most recent zip from sourceforge
2) Copy timetrex.ini.php
3) Replace active timetrex directory with updated source files
4) Replace timetrex.ini.php
5) Reset permissions to timetrex directory
6) Run install/upgrade from browser
Error log below:
ALTER TABLE schedule rename to schedule_tmp;
DROP INDEX schedule_id ON schedule_tmp;
DROP INDEX schedule_recurring_schedule_template_control_id ON schedule_tmp;
DROP INDEX schedule_start_time ON schedule_tmp;
DROP INDEX schedule_user_date_id ON schedule_tmp;
CREATE TABLE schedule (
id integer NOT NULL,
company_id integer DEFAULT 0 NOT NULL,
user_date_id integer NOT NULL,
status_id integer NOT NULL,
replaced_id integer DEFAULT 0 NOT NULL,
recurring_schedule_template_control_id integer DEFAULT 0 NOT NULL,
start_time timestamp NOT NULL,
end_time timestamp NOT NULL,
schedule_policy_id integer,
absence_policy_id integer,
branch_id integer,
department_id integer,
job_id integer,
job_item_id integer,
total_time integer,
note text,
created_date integer,
created_by integer,
updated_date integer,
updated_by integer,
deleted_date integer,
deleted_by integer,
deleted smallint DEFAULT 0 NOT NULL
);
INSERT INTO schedule (id,company_id,user_date_id,status_id,start_time,end_time,schedule_policy_id,absence_policy_id,branch_id,department_id,job_id,job_item_id,total_time,note,created_date,created_by,u
pdated_date,updated_by,deleted_date,deleted_by,deleted) ( select a.id,CASE WHEN c.company_id is NOT NULL THEN c.company_id ELSE 0 END,a.user_date_id,a.status_id,a.start_time,a.end_time,a.schedule_poli
cy_id,a.absence_policy_id,a.branch_id,a.department_id,a.job_id,a.job_item_id,a.total_time,a.note,a.created_date,a.created_by,a.updated_date,a.updated_by,a.deleted_date,a.deleted_by,a.deleted FROM sch
edule_tmp as a LEFT JOIN user_date as b ON a.user_date_id = b.id LEFT JOIN users as c ON b.user_id = c.id ORDER BY a.user_date_id );
DROP TABLE schedule_tmp;
CREATE UNIQUE INDEX schedule_id ON schedule(id);
CREATE INDEX schedule_recurring_schedule_template_control_id ON schedule(recurring_schedule_template_control_id);
CREATE INDEX schedule_start_time_end_time ON schedule(start_time,end_time);
CREATE INDEX schedule_user_date_id ON schedule(user_date_id);
CREATE INDEX schedule_company_id ON schedule(company_id);
UPDATE schedule_id_seq set ID = ( select max(id) from schedule )+1;
DELETE FROM user_wage where user_id = 0;
UPDATE company_generic_map_id_seq set ID = ( select max(id) from company_generic_map )+1;
"
</pre><br>
DEBUG [L0114] [222ms]: <b>InstallSchema_Base::_InstallSchema()</b>: Schema SQL has data, executing commands!<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: PHP ERROR - FATAL(1): Uncaught exception 'ADODB_Exception' with message 'mysqli error: [1146: Table 'timetrex.schedule_id_seq' doesn't exist] in adodb_throw(<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: <br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: UPDATE schedule_id_seq set ID = ( select max(id) from schedule )+1, )<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: ' in /var/www/timetrex/classes/adodb/adodb-exceptions.inc.php:78<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: Stack trace:<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: #0 /var/www/timetrex/classes/adodb/adodb.inc.php(227): adodb_throw('mysqli', 'adodb_throw', 1146, 'Table 'timetrex...', '??UPDATE schedu...', false, Object(ADODB_mysqli))<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: #1 /var/www/timetrex/classes/adodb/adodb.inc.php(1050): ADODB_TransMonitor('mysqli', 'EXECUTE', 1146, 'Table 'timetrex...', '??UPDATE schedu...', false, Object(ADODB_mysqli))<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: #2 /var/www/timetrex/classes/adodb/adodb.inc.php(1017): ADOConnection->_Execute('??UPDATE schedu...', false)<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: #3 /var/www/timetrex/classes/modules/install/InstallSchema_Base.class.php(125): ADOConnection->Execute('??UPDATE schedu...')<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: #4 /var/www/timetrex/classes/modules/install/InstallSchema_Base.class.php(169): InstallSchema_Base->_InstallSchema()<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: #5 [internal function]: InstallSchema_Base File: /var/www/timetrex/classes/adodb/adodb-exceptions.inc.php Line: 78<br>
DEBUG [L0184] [402ms]: <b>Debug::Text()</b>: Detected PHP errors (1), emailing log...<br>
I've encountered an install error while trying to upgrade. The upgrade is from version 5.0.8 to 5.2.3. I have also tried upgrading to 5.1.0 while troubleshooting but still receive the same error. This error is crucial, as the current version of timetrex we are on does not have the updated tax tables. We cannot pay our employees until this data is up to date. Current setup is:
- Ubuntu Desktop/Server 10.04 LTS (desktop for test environment, server for production)
- Apache v2.2.14
- MySQL v5.1.66
- PHP 5.3.2
Steps to upgrade:
1) Download most recent zip from sourceforge
2) Copy timetrex.ini.php
3) Replace active timetrex directory with updated source files
4) Replace timetrex.ini.php
5) Reset permissions to timetrex directory
6) Run install/upgrade from browser
Error log below:
ALTER TABLE schedule rename to schedule_tmp;
DROP INDEX schedule_id ON schedule_tmp;
DROP INDEX schedule_recurring_schedule_template_control_id ON schedule_tmp;
DROP INDEX schedule_start_time ON schedule_tmp;
DROP INDEX schedule_user_date_id ON schedule_tmp;
CREATE TABLE schedule (
id integer NOT NULL,
company_id integer DEFAULT 0 NOT NULL,
user_date_id integer NOT NULL,
status_id integer NOT NULL,
replaced_id integer DEFAULT 0 NOT NULL,
recurring_schedule_template_control_id integer DEFAULT 0 NOT NULL,
start_time timestamp NOT NULL,
end_time timestamp NOT NULL,
schedule_policy_id integer,
absence_policy_id integer,
branch_id integer,
department_id integer,
job_id integer,
job_item_id integer,
total_time integer,
note text,
created_date integer,
created_by integer,
updated_date integer,
updated_by integer,
deleted_date integer,
deleted_by integer,
deleted smallint DEFAULT 0 NOT NULL
);
INSERT INTO schedule (id,company_id,user_date_id,status_id,start_time,end_time,schedule_policy_id,absence_policy_id,branch_id,department_id,job_id,job_item_id,total_time,note,created_date,created_by,u
pdated_date,updated_by,deleted_date,deleted_by,deleted) ( select a.id,CASE WHEN c.company_id is NOT NULL THEN c.company_id ELSE 0 END,a.user_date_id,a.status_id,a.start_time,a.end_time,a.schedule_poli
cy_id,a.absence_policy_id,a.branch_id,a.department_id,a.job_id,a.job_item_id,a.total_time,a.note,a.created_date,a.created_by,a.updated_date,a.updated_by,a.deleted_date,a.deleted_by,a.deleted FROM sch
edule_tmp as a LEFT JOIN user_date as b ON a.user_date_id = b.id LEFT JOIN users as c ON b.user_id = c.id ORDER BY a.user_date_id );
DROP TABLE schedule_tmp;
CREATE UNIQUE INDEX schedule_id ON schedule(id);
CREATE INDEX schedule_recurring_schedule_template_control_id ON schedule(recurring_schedule_template_control_id);
CREATE INDEX schedule_start_time_end_time ON schedule(start_time,end_time);
CREATE INDEX schedule_user_date_id ON schedule(user_date_id);
CREATE INDEX schedule_company_id ON schedule(company_id);
UPDATE schedule_id_seq set ID = ( select max(id) from schedule )+1;
DELETE FROM user_wage where user_id = 0;
UPDATE company_generic_map_id_seq set ID = ( select max(id) from company_generic_map )+1;
"
</pre><br>
DEBUG [L0114] [222ms]: <b>InstallSchema_Base::_InstallSchema()</b>: Schema SQL has data, executing commands!<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: PHP ERROR - FATAL(1): Uncaught exception 'ADODB_Exception' with message 'mysqli error: [1146: Table 'timetrex.schedule_id_seq' doesn't exist] in adodb_throw(<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: <br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: UPDATE schedule_id_seq set ID = ( select max(id) from schedule )+1, )<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: ' in /var/www/timetrex/classes/adodb/adodb-exceptions.inc.php:78<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: Stack trace:<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: #0 /var/www/timetrex/classes/adodb/adodb.inc.php(227): adodb_throw('mysqli', 'adodb_throw', 1146, 'Table 'timetrex...', '??UPDATE schedu...', false, Object(ADODB_mysqli))<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: #1 /var/www/timetrex/classes/adodb/adodb.inc.php(1050): ADODB_TransMonitor('mysqli', 'EXECUTE', 1146, 'Table 'timetrex...', '??UPDATE schedu...', false, Object(ADODB_mysqli))<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: #2 /var/www/timetrex/classes/adodb/adodb.inc.php(1017): ADOConnection->_Execute('??UPDATE schedu...', false)<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: #3 /var/www/timetrex/classes/modules/install/InstallSchema_Base.class.php(125): ADOConnection->Execute('??UPDATE schedu...')<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: #4 /var/www/timetrex/classes/modules/install/InstallSchema_Base.class.php(169): InstallSchema_Base->_InstallSchema()<br>
DEBUG [L0078] [402ms]: <b>Debug::Shutdown()</b>: #5 [internal function]: InstallSchema_Base File: /var/www/timetrex/classes/adodb/adodb-exceptions.inc.php Line: 78<br>
DEBUG [L0184] [402ms]: <b>Debug::Text()</b>: Detected PHP errors (1), emailing log...<br>