prefix}survey_course_idx;",false); execute_sql("DROP INDEX {$CFG->prefix}survey_analysis_survey_idx;",false); execute_sql("DROP INDEX {$CFG->prefix}survey_analysis_userid_idx;",false); execute_sql("DROP INDEX {$CFG->prefix}survey_answers_userid_idx;",false); execute_sql("DROP INDEX {$CFG->prefix}survey_answers_survey_idx;",false); execute_sql("DROP INDEX {$CFG->prefix}survey_answers_question_idx;",false); modify_database('','CREATE INDEX prefix_survey_course_idx ON prefix_survey (course);'); modify_database('','CREATE INDEX prefix_survey_analysis_survey_idx ON prefix_survey_analysis (survey);'); modify_database('','CREATE INDEX prefix_survey_analysis_userid_idx ON prefix_survey_analysis (userid);'); modify_database('','CREATE INDEX prefix_survey_answers_userid_idx ON prefix_survey_answers (userid);'); modify_database('','CREATE INDEX prefix_survey_answers_survey_idx ON prefix_survey_answers (survey);'); modify_database('','CREATE INDEX prefix_survey_answers_question_idx ON prefix_survey_answers (question);'); } if ($oldversion < 2005031600) { execute_sql('SELECT setval(\''.$CFG->prefix.'survey_id_seq\', (select max(id) from '.$CFG->prefix.'survey))'); execute_sql('SELECT setval(\''.$CFG->prefix.'survey_questions_id_seq\', (select max(id) from '.$CFG->prefix.'survey_questions))'); } ////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions. return true; } ?>