]> git.mjollnir.org Git - moodle.git/commitdiff
Added "notification" field, currently unused, to allow MDL-8377
authormoodler <moodler>
Tue, 14 Aug 2007 04:13:58 +0000 (04:13 +0000)
committermoodler <moodler>
Tue, 14 Aug 2007 04:13:58 +0000 (04:13 +0000)
mod/data/db/install.xml
mod/data/db/upgrade.php
mod/data/version.php

index 02e428a9945632ed1a5d49a4669b1ec04f6ef944..3bfc2526f1e8031c58d8369431f27995d0486877 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="mod/data/db" VERSION="20060923" COMMENT="XMLDB file for Moodle mod/data"
+<XMLDB PATH="mod/data/db" VERSION="20070814" COMMENT="XMLDB file for Moodle mod/data"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
 >
@@ -34,7 +34,8 @@
         <FIELD NAME="assessed" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="scale" NEXT="defaultsort"/>
         <FIELD NAME="defaultsort" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="assessed" NEXT="defaultsortdir"/>
         <FIELD NAME="defaultsortdir" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="defaultsort" NEXT="editany"/>
-        <FIELD NAME="editany" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="defaultsortdir"/>
+        <FIELD NAME="editany" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="defaultsortdir" NEXT="notification"/>
+        <FIELD NAME="notification" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" ENUM="false" COMMENT="Notify people when things change" PREVIOUS="editany"/>
       </FIELDS>
       <KEYS>
         <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for data"/>
index e027f183d28595eba4be8d6d4192ac8432b55825..a7b6a316cde127ebe2261d4941e8a9ff51e6dbaf 100644 (file)
@@ -63,6 +63,17 @@ function xmldb_data_upgrade($oldversion=0) {
         $db->debug = true;
     }  
 
+    if ($result && $oldversion < 2007081400) {
+
+    /// Define field notification to be added to data
+        $table = new XMLDBTable('data');
+        $field = new XMLDBField('notification');
+        $field->setAttributes(XMLDB_TYPE_INTEGER, '10', null, null, null, null, null, null, 'editany');
+
+    /// Launch add field notification
+        $result = $result && add_field($table, $field);
+    }
+
 
     return $result;
 }
index e54cd9ef60693e87de0bb9224c586481fbc9f8e0..d3e4e0cf05c15809f6200af769a08342a6d42b91 100644 (file)
@@ -5,7 +5,7 @@
 //  This fragment is called by /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-$module->version  = 2007072200;
+$module->version  = 2007081400;
 $module->requires = 2007072200;  // Requires this Moodle version
 $module->cron     = 60;