function course_search_update

7.x course_search.install course_search_update($old_schema, $new_schema)
6.x course_search.install course_search_update($old_schema, $new_schema)

Implements hook_update

File

modules/course_search/course_search.install, line 52

Code

function course_search_update($old_schema, $new_schema) {

  if ($old_schema < 2) {
    // Add new column to course_rotation_schedule to keep up with seat capacity.
    db_query("ALTER TABLE course_rotation_schedule ADD COLUMN `capacity` int(11)  ");
    db_query("ALTER TABLE course_rotation_schedule ADD INDEX (`capacity`) ");

    // Also add extra indexes for better searching
    db_query("ALTER TABLE course_rotation_schedule ADD INDEX (`course_id`) ");
    db_query("ALTER TABLE course_rotation_schedule ADD INDEX (`term_id`) ");
    db_query("ALTER TABLE course_rotation_schedule ADD INDEX (`posted`) ");

  }


}