-
Bug
-
Resolution: Fixed
-
Blocker
-
2.0, 2.0.1
-
MOODLE_20_STABLE
-
MOODLE_20_STABLE
-
Moderate
Here is the stack track, it explains the issue.
Debug info: Field tag_instance->tiuserid cannot be added. Not null fields added to non empty tables require default value. Create skipped
Stack trace:
- line 579 of /lib/ddl/database_manager.php: ddl_exception thrown
- line 243 of /lib/db/upgrade.php: call to database_manager->add_field()
- line 1309 of /lib/upgradelib.php: call to xmldb_main_upgrade()
- line 252 of /admin/index.php: call to upgrade_core()
Looking at line 242 in /lib/db/upgrade.php contains the following line: $field->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, 'itemid');
Changing this to: $field->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0, 'itemid'); fixes the issue. It is also possible to set the other field to XMLDB_NULL instead.
- is duplicated by
-
MDL-26116 upgrade issue: tag_instance.tiuserid should have default value
-
- Closed
-