Forums | Mahara Community
Support
/
upgrade from 1.2.6 to 1.6.3
28 February 2013, 2:58
HI All,
I hope someone can shed some light on my problem: I trying to upgrade my mahara installation to the newest 1.6.3 and when i run it i get:
Could not execute command: UPDATE "artefact" SET author = owner WHERE owner IS NOT NULL
Call stack (most recent first):
execute_sql("UPDATE {artefact} SET author = owner WHERE owner I...") at /usr/local/www/apache22/data/epup16/lib/db/upgrade.php:1470
xmldb_core_upgrade("2009111017") at /usr/local/www/apache22/data/epup16/lib/upgrade.php:301
upgrade_core(object(stdClass)) at /usr/local/www/apache22/data/epup16/admin/upgrade.json.php:94
then if i reload the page i get :
Could not execute command: ALTER TABLE artefact ADD CONSTRAINT arte_aut_fk FOREIGN KEY (author) REFERENCES usr (id)
Call stack (most recent first):
execute_sql("ALTER TABLE artefact ADD CONSTRAINT arte_aut_fk FO...") at /usr/local/www/apache22/data/epup16/lib/dml.php:1395
execute_sql_arr(array(size 1), true, true) at /usr/local/www/apache22/data/epup16/lib/ddl.php:1051
add_key(object(XMLDBTable), object(XMLDBKey)) at /usr/local/www/apache22/data/epup16/lib/db/upgrade.php:1456
xmldb_core_upgrade("2009111017") at /usr/local/www/apache22/data/epup16/lib/upgrade.php:301
upgrade_core(object(stdClass)) at /usr/local/www/apache22/data/epup16/admin/upgrade.json.php:94
any ideas? I've blanked the db several times and still the same error
Pete
28 February 2013, 3:49
I did just this recently and had massive problems. Are you running MySQL?
To cut a long story short - I did two things...
- upgrade in baby steps, one version at a time
- before you start and between each step verify and repair your database schema
In my case it was miles out and got broken again after each upgrade. Roughly speaking you need to create a completely new install of Mahara alongside your original - at each step - using *exactly* the same code, then compere using something like http://schemasync.org/
28 February 2013, 14:46
Hi Pete,
Yeah, like Howard said, the best way to do this is to upgrade one major version at a time. 1.2.x -> 1.3.x -> 1.4.x -> 1.5.x -> 1.6.x.
And after doing that, it would be prudent to run a schema comparison program to make sure your database structure hasn't drifted from what it would be with a new 1.6 installation. If you do find any differences, we'd appreciate it if you could log a bug on https://bugs.launchpad.net/mahara/ . In theory, there shouldn't be any problems, but it does seem that people sometimes have issues when they've upgraded a Mahara through multiple versions.
Cheers,
Aaron