mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
DB upgrade script to clean up enrol field for user_students and user_teachers (Merged from MOODLE_15_STABLE)
This commit is contained in:
parent
78c7303cb4
commit
739f3e5067
@ -1653,6 +1653,11 @@ function main_upgrade($oldversion=0) {
|
||||
table_column('course_request','','password','varchar',50);
|
||||
}
|
||||
|
||||
if ($oldversion < 2005103100) { // Repair enrol field in user_students/user_teacher table
|
||||
execute_sql("UPDATE {$CFG->prefix}user_students SET enrol='manual' WHERE enrol='' OR enrol='internal'");
|
||||
execute_sql("UPDATE {$CFG->prefix}user_teachers SET enrol='manual' WHERE enrol=''");
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -1395,6 +1395,11 @@ function main_upgrade($oldversion=0) {
|
||||
table_column('course_request','','password','text');
|
||||
}
|
||||
|
||||
if ($oldversion < 2005103100) { // Repair enrol field in user_students/user_teacher table
|
||||
execute_sql("UPDATE {$CFG->prefix}user_students SET enrol='manual' WHERE enrol='' OR enrol='internal'");
|
||||
execute_sql("UPDATE {$CFG->prefix}user_teachers SET enrol='manual' WHERE enrol=''");
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
// This is compared against the values stored in the database to determine
|
||||
// whether upgrades should be performed (see lib/db/*.php)
|
||||
|
||||
$version = 2005101200; // YYYYMMDD = date
|
||||
$version = 2005103100; // YYYYMMDD = date
|
||||
// XY = increments within a single day
|
||||
|
||||
$release = '1.6 development'; // Human-friendly version name
|
||||
|
Loading…
x
Reference in New Issue
Block a user