Author Topic: 1.4.2 -> 1.5 breaks installation  (Read 12865 times)

Number8

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
1.4.2 -> 1.5 breaks installation
« on: July 28, 2009, 10:34:19 am »
In my 1.4.2 OG site I went to Administration->Upgrades.  Selected the automatic upgrade.  Selected 1.4.2 to 1.5.

Got this error message:
-- <snip successful stuff>
-- Test query has been executed. Its safe to proceed with database migration.
-- Failed to execute DB schema transformations. MySQL said: Table 'og_template_parameters' already exists
-- Error upgrading to version 1.5

When I try to go my OG installation, I get this message:
Query failed with message 'Unknown column 'updated_by_id' in 'field list''

Any hints on how to un-break my OG installation?

Bithunter

  • Freshman
  • *
  • Posts: 11
    • View Profile
Re: 1.4.2 -> 1.5 breaks installation
« Reply #1 on: July 28, 2009, 11:04:20 am »
I've to edit \opengoo\public\upgrade\templates\db_migration\1_5_figazza.php to fix the upgrade.

Number8

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: 1.4.2 -> 1.5 breaks installation
« Reply #2 on: July 28, 2009, 11:35:55 am »
I've to edit \opengoo\public\upgrade\templates\db_migration\1_5_figazza.php to fix the upgrade.
Could you share what the edits are to make the upgrade work?

Number8

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: 1.4.2 -> 1.5 breaks installation
« Reply #3 on: July 28, 2009, 01:14:45 pm »

robbrandt

  • Freshman
  • *
  • Posts: 42
    • View Profile
    • Email
Re: 1.4.2 -> 1.5 breaks installation
« Reply #4 on: July 28, 2009, 01:26:23 pm »
Running the upgrade, I get:

Config file found and loaded. File '/config/config.php' exists and is writable Folder '/config' exists and is writable Folder '/cache' exists and is writable Folder '/tmp' exists and is writable Folder '/upload' exists and is writable Extension 'mysql' is loaded Extension 'gd' is loaded Extension 'simplexml' is loaded Upgrade script has connected to the database. Test query has been executed. Its safe to proceed with database migration. Upgrade script has connected to the database. Test query has been executed. Its safe to proceed with database migration.
Fatal error: Call to undefined method FigazzaUpgradeScript::checkColumnExists() in C:\wwwroot\opengoo\public\upgrade\scripts\FigazzaUpgradeScript.class.php on line 184

Number8

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: 1.4.2 -> 1.5 breaks installation
« Reply #5 on: July 28, 2009, 05:55:48 pm »
Can I just re-install the 1.4.2 files to get my OG site working again, or did the 'upgrade' wreck the db?

robbrandt

  • Freshman
  • *
  • Posts: 42
    • View Profile
    • Email
Re: 1.4.2 -> 1.5 breaks installation
« Reply #6 on: July 28, 2009, 06:04:07 pm »
No,it looks bleak for 1.4.2.  I restored by database, but after changing all the version numbers in the obvious places to this newbie, I still can't convince opengoo that it isn't version 1.5 and that it needs to upgrade the database.

So I have moved on to looking at the upgrade scripts and applying them by hand.

Number8

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: 1.4.2 -> 1.5 breaks installation
« Reply #7 on: July 28, 2009, 06:56:23 pm »
Quote
So I have moved on to looking at the upgrade scripts and applying them by hand.
I am far from accomplished with php and sql, but that looks like several hours work, trying to figure out what was accomplished by the upgrade script before it crashed and burned, and then applying the rest of the changes individually...

Good luck, let us know how it goes.
« Last Edit: July 28, 2009, 06:58:32 pm by Number8 »

robbrandt

  • Freshman
  • *
  • Posts: 42
    • View Profile
    • Email
Re: 1.4.2 -> 1.5 breaks installation
« Reply #8 on: July 28, 2009, 08:11:24 pm »
I give up, my installation is hosed and I'm crippled.

I tried running the 1.5 sql template, substituting all the variables for their default values.  When I try to access OpenGoo I get:

We are sorry, but OpenGoo is not currently able to execute your request. An Error Report has been sent to the administrator.

I have successfully reverted to 1.4.2 though, simply by restoring the db backup I made prior to upgrading, and uploading the 1.4.2 files.

Number8

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: 1.4.2 -> 1.5 breaks installation
« Reply #9 on: July 28, 2009, 11:01:22 pm »
I give up, my installation is hosed and I'm crippled.
<snip>
I have successfully reverted to 1.4.2 though, simply by restoring the db backup I made prior to upgrading, and uploading the 1.4.2 files.
My installation is mangled, too.  
Unfortunately, I don't have a recent db backup, since I (naively) count on an upgrade script to do the right things, including not crushing a working web site.

robbrandt: How do you backup and restore your OG db?
« Last Edit: July 29, 2009, 08:01:57 am by Number8 »

robbrandt

  • Freshman
  • *
  • Posts: 42
    • View Profile
    • Email
Re: 1.4.2 -> 1.5 breaks installation
« Reply #10 on: July 28, 2009, 11:55:23 pm »
My guess is that 1.5 was tested against 1.4 or 1.41, but not 1.42.

I suppose you could do a fresh install of 1.5 and copy your data across, or at least look where the schema might be different.  Worst case you can start comparing data for configuration differences and make them the same.

Bithunter

  • Freshman
  • *
  • Posts: 11
    • View Profile
Re: 1.4.2 -> 1.5 breaks installation
« Reply #11 on: July 29, 2009, 09:20:02 am »
I've to edit \opengoo\public\upgrade\templates\db_migration\1_5_figazza.php to fix the upgrade.
Could you share what the edits are to make the upgrade work?

Scripts it´s not atomic, so I run it, see the error, edit the file, run again, edit again for next error, etc.
Final edit it´s not useful, you should check step by step ...

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: 1.4.2 -> 1.5 breaks installation
« Reply #12 on: July 29, 2009, 02:07:18 pm »
Hi all,

The solution as Bithunter suggested is to repeat this procedure until you get a successful upgrade:

1) run the upgrade
2) get an error?
    a) YES: erase the line that throwed the error (or the first line if you are not sure) of 'public/upgrade/templates/db_migration/1_5_figazza.php' and go to 1)
    b) NO: You have upgraded successfully.

Of course we will try to improve this for version 1.6. There are several things we can do to improve this, one is using transactions to avoid ending with a broken installation. We would also like to split the upgrade process in smaller steps, however this conflicts with running the upgrade in one transaction. We'll have to give it some thought.

Thanks all for your patience.

Number8

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: 1.4.2 -> 1.5 breaks installation
« Reply #13 on: July 29, 2009, 07:00:01 pm »

The solution as Bithunter suggested is to repeat this procedure until you get a successful upgrade:
1) run the upgrade
2) get an error?
    a) YES: erase the line that throwed the error (or the first line if you are not sure) of 'public/upgrade/templates/db_migration/1_5_figazza.php' and go to 1)
    b) NO: You have upgraded successfully.

That's a solution?  I'll wait for 1.6 before trying to upgrade any more 1.4.2 installations...

tuba

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: 1.4.2 -> 1.5 breaks installation
« Reply #14 on: July 30, 2009, 08:04:56 pm »
hi all
I had the same problem
Running the upgrade, I get:

Config file found and loaded. File '/config/config.php' exists and is writable Folder '/config' exists and is writable Folder '/cache' exists and is writable Folder '/tmp' exists and is writable Folder '/upload' exists and is writable Extension 'mysql' is loaded Extension 'gd' is loaded Extension 'simplexml' is loaded Upgrade script has connected to the database. Test query has been executed. Its safe to proceed with database migration. Upgrade script has connected to the database. Test query has been executed. Its safe to proceed with database migration.
Fatal error: Call to undefined method FigazzaUpgradeScript::checkColumnExists() in C:\wwwroot\opengoo\public\upgrade\scripts\FigazzaUpgradeScript.class.php on line 184


Quote
  • I made the query directly in mysql
Code: [Select]
ALTER TABLE `".TABLE_PREFIX."users` ADD COLUMN `updated_by_id` int(10) unsigned default NULL;(don't forget to change ".TABLE_PREFIX." with your prefix )
  • commented the lines 184 to 188 of FigazzaUpgradeScript.class.php
  • and restart the update without any problem
may be it will work for you  :)

« Last Edit: July 30, 2009, 08:40:04 pm by tuba »