I was trying to upgrade a moodle site from 1.9 to 2.0 with some real data, it failed half way through mod_folder upgrades and I got the following errors:
Debug info: Duplicate entry '2029' for key 'mdl_resoold_old_uix'
INSERT INTO mdl_resource_old (oldid, course, name, type, reference, intro, introformat, alltext, popup, options, timemodified, cmid)
SELECT r.id, r.course, r.name, r.type, r.reference, r.summary, 0, r.alltext, r.popup, r.options, r.timemodified, cm.id
FROM mdl_resource r
LEFT JOIN mdl_course_modules cm ON (r.id = cm.instance AND cm.module = ?)
[array (
0 => '13',
)]
Stack trace:
- line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown
- line 682 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 252 of /mod/resource/db/upgradelib.php: call to mysqli_native_moodle_database->execute()
- line 46 of /mod/folder/db/upgradelib.php: call to resource_20_prepare_migration()
- line 39 of /mod/folder/db/install.php: call to folder_20_migrate()
- line 468 of /lib/upgradelib.php: call to xmldb_folder_install()
- line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules()
- line 1352 of /lib/upgradelib.php: call to upgrade_plugins()
- line 290 of /admin/index.php: call to upgrade_noncore()
any ideas?
Thanks in advance,
Lei