Advertisement:

Author Topic: [solved] update error  (Read 5933 times)

masmaz

  • Jr. Member
  • **
  • Posts: 67
[solved] update error
« on: February 26, 2013, 11:25:26 pm »
I upgraded directly by the admin but it gave me this error

Quote
Checking for updates (Current version 302)New version to update: 310
Aggiornamento della tua installazione OSClass (potrebbe volerci un po\'):Problems when upgrading the database

We had some errors upgrading your database. The follwing queries failed:ALTER TABLE osc_t_alerts ADD COLUMN pk_i_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT
help me please

I now have the site with the update message

regards
Max
« Last Edit: February 27, 2013, 10:46:48 am by masmaz »

mitayai

  • Newbie
  • *
  • Posts: 1
Re: update error
« Reply #1 on: February 26, 2013, 11:53:34 pm »
Same issue for me.

while performing the automated upgrade, i got the message:

"Upgrade

Your OSClass installation can be auto-upgraded. Please, back up your database and the folder oc-content before attempting to upgrade your OSClass installation. You can also upgrade OSClass manaully, more information in the Wiki

Checking for updates (Current version 302)New version to update: 310
Upgrading your OSClass installation (this could take a while):Problems when upgrading the database

We had some errors upgrading your database. The follwing queries failed:ALTER TABLE oc_t_alerts ADD COLUMN pk_i_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT"


when running the query manually on the db using phpmyadmin, i see the message:

#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key


i think perhaps the sql update script needs to include the primary key assignment in the same alter statement?

masmaz

  • Jr. Member
  • **
  • Posts: 67
Re: update error
« Reply #2 on: February 26, 2013, 11:56:40 pm »
I do not know, but we hope that some of the staff to help us....  :-\

Noosa

  • Jr. Member
  • **
  • Posts: 55
Re: update error
« Reply #3 on: February 27, 2013, 03:03:49 am »
i think perhaps the sql update script needs to include the primary key assignment in the same alter statement?

Looks like you're correct mitayai. The line is commented out within oc-includes/osclass/upgrade-funcs.php

Around line 389
Code: [Select]
    if(osc_version() < 310) {
       //$comm->query(sprintf("ALTER TABLE  %st_alerts ADD  `pk_i_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY", DB_TABLE_PREFIX));
        $comm->query(sprintf("ALTER TABLE  %st_pages ADD  `s_meta` TEXT NULL", DB_TABLE_PREFIX));
        $comm->query(sprintf("ALTER TABLE  %st_pages ADD  `b_link` TINYINT(1) NOT NULL DEFAULT 1", DB_TABLE_PREFIX));
        $comm->query(sprintf("UPDATE %st_alerts SET dt_date = '%s' ", DB_TABLE_PREFIX, date("Y-m-d H:i:s")));


trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: update error
« Reply #4 on: February 27, 2013, 07:34:07 am »
Hmm, that is strange I just tried the upgrade and it worked just fine. I did an upgrade form 3.0.2 to 3.1

In any case the Osclass team should be back in a few hours and they will find the fix for this issue.

Jay

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: update error
« Reply #5 on: February 27, 2013, 10:24:18 am »
Hmm, that is strange I just tried the upgrade and it worked just fine. I did an upgrade form 3.0.2 to 3.1

In any case the Osclass team should be back in a few hours and they will find the fix for this issue.

Jay

I'm really not sure how to fix it, since the fix I made it's clearly not working.

You could add "PRIMARY KEY" at the end and update the dabtabase manually

Code: [Select]
ALTER TABLE  {YOUR PREFIX HERE}t_alerts ADD  `pk_i_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY

Users also reported that trying TWICE the upgrade process it worked.

Could anyone tell me his/her MySQL version, It has to be related.

Thanks

masmaz

  • Jr. Member
  • **
  • Posts: 67
Re: update error
« Reply #6 on: February 27, 2013, 10:46:18 am »
in fact, I tried the second time and it went well :D
for now this is the solution to my problem

thanks all

Max

rcetc

  • Newbie
  • *
  • Posts: 7
Re: [solved] update error
« Reply #7 on: February 28, 2013, 12:16:49 am »
Quote
Looks like you're correct mitayai. The line is commented out within oc-includes/osclass/upgrade-funcs.php

Around line 389

Code: [Select]
    if(osc_version() < 310) {
       //$comm->query(sprintf("ALTER TABLE  %st_alerts ADD  `pk_i_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY", DB_TABLE_PREFIX));
        $comm->query(sprintf("ALTER TABLE  %st_pages ADD  `s_meta` TEXT NULL", DB_TABLE_PREFIX));
        $comm->query(sprintf("ALTER TABLE  %st_pages ADD  `b_link` TINYINT(1) NOT NULL DEFAULT 1", DB_TABLE_PREFIX));
        $comm->query(sprintf("UPDATE %st_alerts SET dt_date = '%s' ", DB_TABLE_PREFIX, date("Y-m-d H:i:s"
So are we saying if you remove the comment bars on this line the problem is solved?

angkorwonder.com

  • Newbie
  • *
  • Posts: 37
  • Share.Shine.Success
Re: [solved] update error
« Reply #8 on: February 28, 2013, 07:17:57 am »
I have the same problem of unable to upgrade the new version as well. Please, help me this. It said unzip failed.
Quote
Upgrade


Your OSClass installation can be auto-upgraded. Please, back up your database and the folder oc-content before attempting to upgrade your OSClass installation. You can also upgrade OSClass manaully, more information in the Wiki

Checking for updates (Current version 302)New version to update: 310
Upgrading your OSClass installation (this could take a while):Unzip failed

gino

  • Newbie
  • *
  • Posts: 32
  • American Stores
Re: [solved] update error
« Reply #9 on: February 28, 2013, 08:26:14 am »
Can you gave a quick look to my question and see what can you recommend, I can't post anything anymore because of the error message as soon I place a new post.

http://forums.osclass.org/general-help/osclass-3-1-fix-for-call-to-undefined-method-pop3-after-update/

I appreciate big-time your help.

masmaz

  • Jr. Member
  • **
  • Posts: 67
Re: [solved] update error
« Reply #10 on: February 28, 2013, 11:12:09 am »
Quote
Looks like you're correct mitayai. The line is commented out within oc-includes/osclass/upgrade-funcs.php

Around line 389

Code: [Select]
    if(osc_version() < 310) {
       //$comm->query(sprintf("ALTER TABLE  %st_alerts ADD  `pk_i_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY", DB_TABLE_PREFIX));
        $comm->query(sprintf("ALTER TABLE  %st_pages ADD  `s_meta` TEXT NULL", DB_TABLE_PREFIX));
        $comm->query(sprintf("ALTER TABLE  %st_pages ADD  `b_link` TINYINT(1) NOT NULL DEFAULT 1", DB_TABLE_PREFIX));
        $comm->query(sprintf("UPDATE %st_alerts SET dt_date = '%s' ", DB_TABLE_PREFIX, date("Y-m-d H:i:s"
So are we saying if you remove the comment bars on this line the problem is solved?

no I solved retrying automatically update ...

in a few seconds you have upgraded, then I removed from maintenance mode

masmaz

  • Jr. Member
  • **
  • Posts: 67
Re: [solved] update error
« Reply #11 on: February 28, 2013, 11:15:15 am »
I have the same problem of unable to upgrade the new version as well. Please, help me this. It said unzip failed.
Quote
Upgrade


Your OSClass installation can be auto-upgraded. Please, back up your database and the folder oc-content before attempting to upgrade your OSClass installation. You can also upgrade OSClass manaully, more information in the Wiki

Checking for updates (Current version 302)New version to update: 310
Upgrading your OSClass installation (this could take a while):Unzip failed

the only solution is to repeat the automatic update.

I did it the second time, and I succeeded

masmaz

  • Jr. Member
  • **
  • Posts: 67
Re: [solved] update error
« Reply #12 on: February 28, 2013, 11:19:21 am »
Can you gave a quick look to my question and see what can you recommend, I can't post anything anymore because of the error message as soon I place a new post.

http://forums.osclass.org/general-help/osclass-3-1-fix-for-call-to-undefined-method-pop3-after-update/

I appreciate big-time your help.


Same thing for you, try again to remake the automatic update in admin, putting the site in maintenance.

when the update is successful, remove it from maintenance mode.

kcguy

  • Full Member
  • ***
  • Posts: 103
Re: [solved] update error
« Reply #13 on: March 03, 2013, 07:08:11 pm »
It seems to me that the osclass team wanted to go with the " if first you dont succeed, to try and try again "  :D :D :D :D :D