From: stronk7 Date: Sat, 20 Jan 2007 18:10:29 +0000 (+0000) Subject: Now resource->summary is nullable. MDL-7355 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8dc06480571d8a38d3bb7d5fa2e99afe3728d87b;p=moodle.git Now resource->summary is nullable. MDL-7355 --- diff --git a/mod/resource/db/install.xml b/mod/resource/db/install.xml index c610af5598..b31e110d37 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 4609dcf4f0..5152e08469 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 06b10ce982..3882cbdb53 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;