diff --git a/mod/resource/db/install.xml b/mod/resource/db/install.xml index c610af55981..b31e110d376 100644 --- a/mod/resource/db/install.xml +++ b/mod/resource/db/install.xml @@ -1,5 +1,8 @@ - + @@ -8,7 +11,7 @@ - + diff --git a/mod/resource/db/upgrade.php b/mod/resource/db/upgrade.php index 4609dcf4f00..5152e08469e 100644 --- a/mod/resource/db/upgrade.php +++ b/mod/resource/db/upgrade.php @@ -38,6 +38,17 @@ function xmldb_resource_upgrade($oldversion=0) { //ignore result } + if ($result && $oldversion < 2007012000) { + + /// Changing nullability of field summary on table resource to null + $table = new XMLDBTable('resource'); + $field = new XMLDBField('summary'); + $field->setAttributes(XMLDB_TYPE_TEXT, 'small', null, null, null, null, null, null, 'reference'); + + /// Launch change of nullability for field summary + $result = $result && change_field_notnull($table, $field); + } + return $result; } diff --git a/mod/resource/version.php b/mod/resource/version.php index 06b10ce9827..3882cbdb53d 100644 --- a/mod/resource/version.php +++ b/mod/resource/version.php @@ -5,7 +5,7 @@ // This fragment is called by /admin/index.php //////////////////////////////////////////////////////////////////////////////// -$module->version = 2007011700; +$module->version = 2007012000; $module->requires = 2006091700; // Requires this Moodle version $module->cron = 0;