Jump to content


Photo

failed to upgrade 6.6 from 6.5.2

upgrade 6.6 staff response

  • Please log in to reply
4 replies to this topic

#1 medotron

medotron

    Advanced Member

  • Members
  • PipPipPip
  • 54 posts

Posted 17 May 2017 - 04:43 PM

First congratulation! Version 6.6 is released!!!

 

 I got a little problem during upgrade, when I click apply, the program failed, stop -- give me the error below:

 

Exception: "A database change failed to apply: ALTER TABLE `x2_admin` ADD COLUMN `maxUserCount` int(11) NULL DEFAULT '100000' AFTER `timeout`, ADD COLUMN `loginCredsTimeout` int(11) NULL DEFAULT '30' AFTER `maxUserCount`, ADD COLUMN `tokenPersist` tinyint(4) NULL DEFAULT '1' AFTER `loginCredsTimeout`, ADD COLUMN `checkinByDefault` tinyint(4) NULL DEFAULT '1' AFTER `locationTrackingSwitch`;. The error message given was: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'checkinByDefault'

A database change failed to apply: ALTER TABLE `x2_admin` ADD COLUMN `maxUserCount` int(11) NULL DEFAULT '100000' AFTER `timeout`, ADD COLUMN `loginCredsTimeout` int(11) NULL DEFAULT '30' AFTER `maxUserCount`, ADD COLUMN `tokenPersist` tinyint(4) NULL DEFAULT '1' AFTER `loginCredsTimeout`, ADD COLUMN `checkinByDefault` tinyint(4) NULL DEFAULT '1' AFTER `locationTrackingSwitch`;. The error message given was: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name &#039;checkinByDefault&#039;<br />To restore the database to its previous state, use the database dump file update_backup.sql stored in protected/data<br /><br />Update failed.

 

Update failed." in /var/www/mdx2crm/protected/components/UpdaterBehavior.php L2230



#2 X2Raymond

X2Raymond

    Advanced Member

  • Administrators
  • 972 posts
  • LocationSanta Cruz, CA

Posted 18 May 2017 - 08:49 AM

Ahh interesting. Can you confirm that you attempted to update at least twice? If so, there may have been a different error first, the error above is due to one of the new fields being present in the database.

 

To recover and proceed with your update, first restore your database backup from protected/data/update_backup.sql. Once you've done so, examine the schema of the x2_admin table and check for the presence of the checkinByDefault column. If it is present, go ahead and remove that column. Then, proceed to update. Depending on the previous update issue you hit, you may need to repeat this process again for another column or table. Please let me know how it goes and we can troubleshoot your issue.

 

Also as a heads-up, you should be presented with a checkbox on the update page to revert to your database backup in case of error. This would save you the step of reverting to your update_backup.sql file manually whenever a database change fails to apply.



#3 medotron

medotron

    Advanced Member

  • Members
  • PipPipPip
  • 54 posts

Posted 18 May 2017 - 08:52 PM

my server backup every 6 days. You are right, I attempted twice to update it as server is too slow few days ago. 

1 restore the update_backup.sql

2 delete "checkinByDefault" column in x2_admin table

3 try it again to upgrade the system

 

Let me try it and give feedback. :D   Thanks in advance!

 

 

Ahh interesting. Can you confirm that you attempted to update at least twice? If so, there may have been a different error first, the error above is due to one of the new fields being present in the database.

 

To recover and proceed with your update, first restore your database backup from protected/data/update_backup.sql. Once you've done so, examine the schema of the x2_admin table and check for the presence of the checkinByDefault column. If it is present, go ahead and remove that column. Then, proceed to update. Depending on the previous update issue you hit, you may need to repeat this process again for another column or table. Please let me know how it goes and we can troubleshoot your issue.

 

Also as a heads-up, you should be presented with a checkbox on the update page to revert to your database backup in case of error. This would save you the step of reverting to your update_backup.sql file manually whenever a database change fails to apply.



#4 X2Raymond

X2Raymond

    Advanced Member

  • Administrators
  • 972 posts
  • LocationSanta Cruz, CA

Posted 19 May 2017 - 08:44 AM

Excellent sounds great! Please let me know what other issue surfaces and we can troubleshoot and get your system onto 6.6.



#5 medotron

medotron

    Advanced Member

  • Members
  • PipPipPip
  • 54 posts

Posted 20 May 2017 - 08:00 PM

Excellent sounds great! Please let me know what other issue surfaces and we can troubleshoot and get your system onto 6.6.

 

 

That works!!!!!  Thank you!!!







Also tagged with one or more of these keywords: upgrade, 6.6, staff response

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users