0013516: update from 2017.02.2 to 2017.08.6 fails #6686

Closed
Gloirin opened this Issue Jun 9, 2018 · 6 comments

Comments

Projects
None yet
1 participant
@Gloirin

Gloirin commented Jun 9, 2018

Reported by apvit on 3 Oct 2017 13:37

System: Debian 8; php 5.6, postgresql;
Update from 2017.02.2 to 2017.08.6 (package repository) fails with "PHP Fatal error" at "Tinebase - update_43"

Steps to reproduce: CLI input/output:
php /usr/share/tine20/setup.php --config /etc/tine20/config.inc.php --update
PHP Fatal error: Uncaught exception 'Zend_Db_Statement_Exception' with message 'index name does not exist' in /usr/share/tine20/Setup/Backend/Pgsql.php:579
Stack trace:
#0 /usr/share/tine20/Tinebase/Setup/Update/Release10.php(2075): Setup_Backend_Pgsql->dropIndex('groups', 'name')
#1 /usr/share/tine20/Setup/Controller.php(576): Tinebase_Setup_Update_Release10->update_43()
#2 /usr/share/tine20/Setup/Controller.php(461): Setup_Controller->updateApplication(Object(Tinebase_Model_Application), '10')
#3 /usr/share/tine20/Setup/Frontend/Cli.php(302): Setup_Controller->updateApplications(Object(Tinebase_Record_RecordSet))
#4 /usr/share/tine20/Setup/Frontend/Cli.php(258): Setup_Frontend_Cli->_updateApplications()
#5 /usr/share/tine20/Setup/Frontend/Cli.php(66): Setup_Frontend_Cli->_update(Object(Zend_Console_Getopt))
#6 /usr/share/tine20/Setup/Server/Cli.php(119): Setup_Frontend_Cli->handle(Object(Zend_Console_Getopt))
#7 /usr/share/tine20/Setup/Core.php(115): Setup_Server_Cli->handle()
#8 /usr/share/tine20/setup.php(14): Setup_Core: in /usr/share/tine20/Setup/Backend/Pgsql.php on line 579

Additional information: LOG output:
...
29a02 setupuser - 2017-10-03T12:53:12+00:00 INFO (6): Setup_Controller::updateApplication::572 Updating Tinebase - update_38
29a02 setupuser - 2017-10-03T12:53:12+00:00 INFO (6): Setup_Controller::updateApplication::572 Updating Tinebase - update_39
29a02 setupuser - 2017-10-03T12:53:12+00:00 INFO (6): Setup_Controller::updateApplication::572 Updating Tinebase - update_40
29a02 setupuser - 2017-10-03T12:53:48+00:00 INFO (6): Setup_Controller::updateApplication::572 Updating Tinebase - update_41
29a02 setupuser - 2017-10-03T12:53:48+00:00 INFO (6): Tinebase_Scheduler_Task::addAccountSyncTask::332 Saved task Tinebase_User/Group::syncUsers/Groups in scheduler.
29a02 setupuser - 2017-10-03T12:53:48+00:00 INFO (6): Setup_Controller::updateApplication::572 Updating Tinebase - update_42
29a02 setupuser - 2017-10-03T12:53:48+00:00 INFO (6): Setup_Backend_Pgsql::addAddCol::278 Add new column to table accounts
29a02 setupuser - 2017-10-03T12:53:48+00:00 INFO (6): Setup_Controller::updateApplication::572 Updating Tinebase - update_43
29a02 setupuser - 2017-10-03T12:53:48+00:00 ERR (3): Setup_Controller::updateApplication::582 index name does not exist
29a02 setupuser - 2017-10-03T12:53:48+00:00 ERR (3): Setup_Controller::updateApplication::583 #0 /usr/share/tine20/Tinebase/Setup/Update/Release10.php(2075): Setup_Backend_Pgsql->dropIndex('groups', 'name')
#1 /usr/share/tine20/Setup/Controller.php(576): Tinebase_Setup_Update_Release10->update_43()
#2 /usr/share/tine20/Setup/Controller.php(461): Setup_Controller->updateApplication(Object(Tinebase_Model_Application), '10')
#3 /usr/share/tine20/Setup/Frontend/Cli.php(302): Setup_Controller->updateApplications(Object(Tinebase_Record_RecordSet))
#4 /usr/share/tine20/Setup/Frontend/Cli.php(258): Setup_Frontend_Cli->_updateApplications()
#5 /usr/share/tine20/Setup/Frontend/Cli.php(66): Setup_Frontend_Cli->_update(Object(Zend_Console_Getopt))
#6 /usr/share/tine20/Setup/Server/Cli.php(119): Setup_Frontend_Cli->handle(Object(Zend_Console_Getopt))
#7 /usr/share/tine20/Setup/Core.php(115): Setup_Server_Cli->handle()
#8 /usr/share/tine20/setup.php(14): Setup_Core::dispatchRequest()
#9 {main}
29a02 setupuser - 2017-10-03T12:53:48+00:00 INFO (6): Tinebase_Controller_Record_Abstract::delete::1486 Deleting 1 of Tinebase_Model_Role records ...

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by lukasz on 4 Oct 2017 09:14

The issue with update persists after restoring db from the latest backup.

634c8 setupuser - 2017-10-04T09:08:41+00:00 ERR (3): Tinebase_Exception::log::104 Zend_Db_Statement_Exception -> SQLSTATE[42S02]: Base table or view not found: 1146 Table 'noboCrmdb.noboCrm_config_customfields' doesn't exist, query was: ALTER TABLE noboCrm_config_customfields RENAME TO noboCrm_customfield_config

Gloirin commented Jun 11, 2018

Comment posted by lukasz on 4 Oct 2017 09:14

The issue with update persists after restoring db from the latest backup.

634c8 setupuser - 2017-10-04T09:08:41+00:00 ERR (3): Tinebase_Exception::log::104 Zend_Db_Statement_Exception -> SQLSTATE[42S02]: Base table or view not found: 1146 Table 'noboCrmdb.noboCrm_config_customfields' doesn't exist, query was: ALTER TABLE noboCrm_config_customfields RENAME TO noboCrm_customfield_config

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pschuele on 19 Oct 2017 14:18

could you please try to update again with current version 2017.08.7?

Gloirin commented Jun 11, 2018

Comment posted by pschuele on 19 Oct 2017 14:18

could you please try to update again with current version 2017.08.7?

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pschuele on 19 Oct 2017 14:20

please note: we only support the update from the latest minor of a major version to the current release. so you might have to update to 2017.02.5 first.

see https://wiki.tine20.org/Update_Howto#Migration_Path

Gloirin commented Jun 11, 2018

Comment posted by pschuele on 19 Oct 2017 14:20

please note: we only support the update from the latest minor of a major version to the current release. so you might have to update to 2017.02.5 first.

see https://wiki.tine20.org/Update_Howto#Migration_Path

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by apvit on 23 Oct 2017 07:57

Update from 2017.2.x to 2017.8.7 still fails.

There are two problems:

  • update_43 in Release10.php fails at Setup_Backend_Pgsql->dropIndex('groups', 'name')
    when Index "name" does not exist in Table groups
    workaround: set $this->_backend->dropIndex('groups', 'name'); into try catch block

-poll_id is missing - message: PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42703]: Undefined column: 7 FEHLER: Spalte »poll_id« existiert nicht
workaround: create field poll_id in table cal_events manually

Gloirin commented Jun 11, 2018

Comment posted by apvit on 23 Oct 2017 07:57

Update from 2017.2.x to 2017.8.7 still fails.

There are two problems:

  • update_43 in Release10.php fails at Setup_Backend_Pgsql->dropIndex('groups', 'name')
    when Index "name" does not exist in Table groups
    workaround: set $this->_backend->dropIndex('groups', 'name'); into try catch block

-poll_id is missing - message: PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42703]: Undefined column: 7 FEHLER: Spalte »poll_id« existiert nicht
workaround: create field poll_id in table cal_events manually

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pschuele on 9 Nov 2017 12:42

https://gerrit.tine20.com/customers/6319

Gloirin commented Jun 11, 2018

Comment posted by pschuele on 9 Nov 2017 12:42

https://gerrit.tine20.com/customers/6319

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pschuele on 9 Nov 2017 12:52

added a fix for the first problem.

but i don't understand the second one (with poll_id). the column is added in Calendar_Setup_Update_Release11::update_0 (Calendar 11.0 -> 11.1). the update script checks, if the column alreade exists and adds it if not.

Gloirin commented Jun 11, 2018

Comment posted by pschuele on 9 Nov 2017 12:52

added a fix for the first problem.

but i don't understand the second one (with poll_id). the column is added in Calendar_Setup_Update_Release11::update_0 (Calendar 11.0 -> 11.1). the update script checks, if the column alreade exists and adds it if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment