function course_update_7000 in Course 7.2
Same name and namespace in other branches
- 7 course.install \course_update_7000()
Rename schema instances of "enrol" to "enroll".
File
- ./
course.install, line 961 - course.install Install and update functions for Courses.
Code
function course_update_7000() {
// Set all enrol_end to 0 to fix truncation warning.
db_query('update {course_enrolment} set enrol_end = 0 where enrol_end is null');
db_change_field('course_enrolment', 'enrol_end', 'enroll_end', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'Date enrollment ends.',
));
db_rename_table('course_enrolment', 'course_enrollment');
return t('Renamed schema instances of "enrol" to "enroll".');
}