Gallery 2 CVS Core Upgrade Error: 0.8 -> 0.9.3

LogicX
LogicX's picture

Joined: 2003-02-23
Posts: 31
Posted: Wed, 2005-03-16 19:46

I got a fresh copy of gallery2 from CVS, went through the install just fine, then went to my gallery URL and it said I needed to upgrade my core from 0.8 to 0.9.3, okay -- so at the upgrade core page I get an error with this huge output:

An error ocurred while upgrading Gallery Core Module

Something went wrong when we tried to upgrade the core module. In the boxes below you can find some debug information. Report this in the Gallery Forums and we'll help you diagnose the problem.
Stack Trace:
Error (ERROR_STORAGE_FAILURE)

* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1158 (MySqlDatabaseStorage::error)
* in modules/core/classes/GalleryStorage.class at line 241 (MySqlDatabaseStorage::execute)
* in modules/core/CoreModuleExtras.inc at line 314 (GalleryStorage::execute)
* in modules/core/module.inc at line 513 (CoreModule::upgrade)
* in modules/core/classes/GalleryModule.class at line 137 (CoreModule::upgrade)
* in upgrade/steps/UpgradeCoreModuleStep.class at line 68 (CoreModule::installOrUpgrade)
* in upgrade/index.php at line 156 (UpgradeCoreModuleStep::loadTemplateData)

Debug Output:
mysql error: [1051: Unknown table 'g2_ItemPropertiesMap'] in EXECUTE("
DROP TABLE g2_ItemPropertiesMap
")

(mysql):
DROP TABLE g2_ItemPropertiesMap

1051: Unknown table 'g2_ItemPropertiesMap'

ADODB_mysql._Execute(
DROP TABLE g2_ItemPropertiesMap
, false) % line 833, file: adodb.inc.php
ADODB_mysql.Execute(
DROP TABLE g2_ItemPropertiesMap
, Array[0]) % line 1152, file: DatabaseStorage.class
MySqlDatabaseStorage.execute(
DROP TABLE [GalleryItemPropertiesMap]
, Array[0]) % line 241, file: GalleryStorage.class
GalleryStorage.execute(
DROP TABLE [GalleryItemPropertiesMap]
) % line 314, file: CoreModuleExtras.inc
CoreModule.upgrade(Object:CoreModule, null) % line 513, file: module.inc

Solved by just creating a random table name that it was looking for

suggest making it a DROP TABLE IF EXISTS statement

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-03-16 20:23

if you see the upgrader right after doing a new install then something has already gone wrong.
if you're willing to provide ssh/ftp access to your server it would help to debug why this sometimes happens.