-
Sub-task
-
Resolution: Duplicate
-
Critical
-
None
-
1.9.11
-
PostgreSQL
-
MOODLE_19_STABLE
We have a Moodle 1.9.6 which we are trying to update to Moodle 2.0.2. Upgrading to 1.9.11 still give us the same errors when upgrading.
During the upgrade to get these errors and have to manually fix them :-
-->System
++ Increasing size of user idnumber field, this may take a while... ++
!!! DDL sql execution error !!!
!! ERROR: column "lastip" contains null values
ALTER TABLE mdl_user ALTER COLUMN lastip SET NOT NULL !!
!! Stack trace: * line 397 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 636 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
- line 648 of /lib/ddl/database_manager.php: call to database_manager->change_field_type()
- line 1056 of /lib/db/upgrade.php: call to database_manager->change_field_precision()
- line 1383 of /lib/upgradelib.php: call to xmldb_main_upgrade()
- line 106 of /admin/cli/upgrade.php: call to upgrade_core()
!!
AND
-->mod_folder
!!! Error writing to database !!!
!! ERROR: null value in column "reference" violates not-null constraint
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 = $1)
[array (
0 => '13',
)] !!
!! Stack trace: * line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown
- line 232 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
- line 596 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
- line 258 of /mod/resource/db/upgradelib.php: call to pgsql_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 504 of /lib/upgradelib.php: call to xmldb_folder_install()
- line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules()
- line 1426 of /lib/upgradelib.php: call to upgrade_plugins()
- line 111 of /admin/cli/upgrade.php: call to upgrade_noncore()
!!