From: stronk7 Date: Sat, 20 Jan 2007 18:59:22 +0000 (+0000) Subject: Now group->description and groups_groupings->description are NULLable X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=26a1b2f35b0a53859069240b9a6b4ec966e65a29;p=moodle.git Now group->description and groups_groupings->description are NULLable Also, some incorrect default values are out (XMLDB handles them). MDL-7356 & MDL-8239 --- diff --git a/group/db/install.xml b/group/db/install.xml index 97829436a5..5ce78667db 100644 --- a/group/db/install.xml +++ b/group/db/install.xml @@ -1,5 +1,5 @@ - @@ -8,10 +8,10 @@ - - + + - + @@ -40,7 +40,7 @@ - + @@ -93,4 +93,4 @@ - + \ No newline at end of file diff --git a/group/db/upgrade.php b/group/db/upgrade.php index f1508ffb9d..56e6a919c8 100644 --- a/group/db/upgrade.php +++ b/group/db/upgrade.php @@ -211,16 +211,26 @@ function xmldb_group_upgrade($oldversion=0) { $result = true; -/// And upgrade begins here. For each one, you'll need one -/// block of code similar to the next one. Please, delete -/// this comment lines once this file start handling proper -/// upgrade code. + if ($result && $oldversion < 2007012000) { -/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php -/// $result = result of "/lib/ddllib.php" function calls -/// } + /// Changing nullability of field description on table groups to null + $table = new XMLDBTable('groups'); + $field = new XMLDBField('description'); + $field->setAttributes(XMLDB_TYPE_TEXT, 'small', null, null, null, null, null, null, 'name'); + + /// Launch change of nullability for field description + $result = $result && change_field_notnull($table, $field); + + /// Changing nullability of field description on table groups_groupings to null + $table = new XMLDBTable('groups_groupings'); + $field = new XMLDBField('description'); + $field->setAttributes(XMLDB_TYPE_TEXT, 'small', null, null, null, null, null, null, 'name'); + + /// Launch change of nullability for field description + $result = $result && change_field_notnull($table, $field); + } return $result; } -?> \ No newline at end of file +?> diff --git a/group/index.php b/group/index.php index e43e4d06cc..1882e81f2c 100644 --- a/group/index.php +++ b/group/index.php @@ -11,7 +11,7 @@ require_once('../config.php'); require_once('lib.php'); require_once($CFG->libdir.'/moodlelib.php'); -require_once($CFG->libdir.'/json/JSON.php'); +//require_once($CFG->libdir.'/json/JSON.php'); $success = true; @@ -273,4 +273,4 @@ if ($success) { print_footer($course); } -?> \ No newline at end of file +?> diff --git a/group/version.php b/group/version.php index 6efb625eaf..c202927939 100644 --- a/group/version.php +++ b/group/version.php @@ -5,7 +5,7 @@ // This fragment is called by /admin/index.php //////////////////////////////////////////////////////////////////////////////// -$group_version = 2006120401; +$group_version = 2007012000; //$module->requires = 2006120400; // Requires this Moodle version ?>