Commit f168d45b authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Correct not null on submittedtime column (bug #638550)


Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent ddc327c9
......@@ -2178,5 +2178,20 @@ function xmldb_core_upgrade($oldversion=0) {
}
}
if ($oldversion < 2010091500) {
// Previous version of 2010040800 upgrade created the submittedtime
// column not null (see bug #638550)
$table = new XMLDBTable('view');
$field = new XMLDBField('submittedtime');
$field->setAttributes(XMLDB_TYPE_DATETIME, null, null);
change_field_notnull($table, $field);
// Our crappy db is full of redundant data (submittedtime depends on
// submittedhost or submittedgroup) so it's easy to correct this.
execute_sql("
UPDATE {view} SET submittedtime = NULL
WHERE submittedtime IS NOT NULL AND submittedgroup IS NULL AND submittedhost IS NULL"
);
}
return $status;
}
......@@ -28,7 +28,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2010091300;
$config->version = 2010091500;
$config->release = '1.4.0dev';
$config->minupgradefrom = 2008040200;
$config->minupgraderelease = '1.0.0 (release tag 1.0.0_RELEASE)';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment