-
Bug
-
Resolution: Not a bug
-
Minor
-
None
-
1.9.15, 2.1.3
-
None
-
Upgrade from Moodle 1.9.14 to 2.0.5
-
PostgreSQL
-
MOODLE_19_STABLE, MOODLE_21_STABLE
-
I managed to clear duplicated user account from mdle_user table,
moodle=>
moodle=> select username,
moodle-> count(username) AS instances
moodle-> from mdl_user
moodle-> group by username
moodle-> having (count(username) > 1);
username | instances
------------------------------------------------+----------
f.sirname66@student.domainxxx.com.1225454661 | 2
(1 row)
After removing this duplicated name the install moves on with Moodle 2.0.5, then stops with the error below, need some help to resolve. This Moodle Site has moved from 1.5.3 changed to unicode for 1.8.4 then upgrade to 1.9.14+ works with Moodle 1.9.14+ but when trying to upgrade to Moodle 2.0.5+ it stops with this.
Debug info: ERROR: could not create unique index "mdl_userpref_usenam_uix"
|
DETAIL: Key (userid, name)=(0, forum_displaymode) is duplicated.
|
CREATE UNIQUE INDEX mdl_userpref_usenam_uix ON mdl_user_preferences (userid, name)
|
Stack trace:
|
|
line 400 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
|
line 232 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
|
line 573 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
|
line 88 of /lib/ddl/database_manager.php: call to pgsql_native_moodle_database->change_database_structure()
|
line 75 of /lib/ddl/database_manager.php: call to database_manager->execute_sql()
|
line 892 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
|
line 5437 of /lib/db/upgrade.php: call to database_manager->add_inde)
|
line 1423 of /lib/upgradelib.php: call to xmldb_main_upgrade()
|
line 277 of /admin/index.php: call to upgrade_core()
|
What can I do next to get past this error.