Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26c137b
)
MDL-24339 fix for old mysql invalid NULLs in resource popup field
author
Petr Skoda
<skodak@moodle.org>
Fri, 1 Oct 2010 18:43:19 +0000
(18:43 +0000)
committer
Petr Skoda
<skodak@moodle.org>
Fri, 1 Oct 2010 18:43:19 +0000
(18:43 +0000)
mod/resource/db/upgradelib.php
patch
|
blob
|
blame
|
history
diff --git
a/mod/resource/db/upgradelib.php
b/mod/resource/db/upgradelib.php
index
56f3361
..
28ac6dd
100644
(file)
--- a/
mod/resource/db/upgradelib.php
+++ b/
mod/resource/db/upgradelib.php
@@
-202,6
+202,10
@@
function resource_20_prepare_migration() {
return true;
}
+ // fix invalid NULL popup data in old mysql databases
+ $sql = "UPDATE {resource} SET popup = ? WHERE popup IS NULL";
+ $DB->execute($sql, array($DB->sql_empty()));
+
// Adding fields to table resource_old
$table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
$table->add_field('course', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0');