diff --git a/mod/data/db/upgrade.php b/mod/data/db/upgrade.php index feea212596a27..f7f7a65d89462 100644 --- a/mod/data/db/upgrade.php +++ b/mod/data/db/upgrade.php @@ -97,6 +97,18 @@ function xmldb_data_upgrade($oldversion=0) { } } + if ($result && $oldversion < 2007101512) { + /// Launch add field asearchtemplate again if does not exists yet - reported on several sites + + $table = new XMLDBTable('data'); + $field = new XMLDBField('asearchtemplate'); + $field->setAttributes(XMLDB_TYPE_TEXT, 'small', null, null, null, null, null, null, 'jstemplate'); + + if (!field_exists($table, $field)) { + $result = $result && add_field($table, $field); + } + } + return $result; } diff --git a/mod/data/version.php b/mod/data/version.php index b399e7a1af9ed..04777774f3e0f 100644 --- a/mod/data/version.php +++ b/mod/data/version.php @@ -5,7 +5,7 @@ // This fragment is called by /admin/index.php //////////////////////////////////////////////////////////////////////////////// -$module->version = 2007101511; +$module->version = 2007101512; $module->requires = 2007101509; // Requires this Moodle version $module->cron = 60;