You are here

function course_update_6130 in Course 6

Same name and namespace in other branches
  1. 7.2 course.install \course_update_6130()
  2. 7 course.install \course_update_6130()

Add `hidden` column to course_outline, add `created` column to course_enrolment. Add serialized `data` column to course_outline.

File

./course.install, line 639
course.install Install and update functions for Courses.

Code

function course_update_6130() {
  $ret = array();
  if (!db_column_exists('course_outline', 'hidden')) {
    db_add_field($ret, 'course_outline', 'hidden', array(
      'type' => 'int',
      'size' => 'tiny',
      'not null' => TRUE,
      'unsigned' => TRUE,
      'default' => 0,
    ));
  }
  if (!db_column_exists('course_enrolment', 'created')) {
    db_add_field($ret, 'course_enrolment', 'created', array(
      'type' => 'int',
      'not null' => TRUE,
      'unsigned' => TRUE,
      'default' => 0,
    ));
  }
  if (!db_column_exists('course_outline', 'data')) {
    db_add_field($ret, 'course_outline', 'data', array(
      'type' => 'text',
      'serialize' => TRUE,
    ));
  }
  return $ret;
}