From f4da2ed4d764fb2fea77ca6bc007f0581f6d287e Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 17 Feb 2004 03:58:06 +0000 Subject: [PATCH] Don't specify id on upgrades! Thanks, Eloy! --- mod/survey/db/mysql.php | 2 +- mod/survey/db/postgres7.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/survey/db/mysql.php b/mod/survey/db/mysql.php index db34db9142..70fa9eca5a 100644 --- a/mod/survey/db/mysql.php +++ b/mod/survey/db/mysql.php @@ -159,7 +159,7 @@ function survey_upgrade($oldversion) { } if ($oldversion < 2004021601) { - execute_sql("INSERT INTO `{$CFG->prefix}survey` (`id`, `course`, `template`, `days`, `timecreated`, `timemodified`, `name`, `intro`, `questions`) VALUES (5, 0, 0, 0, 985017600, 985017600, 'ciqname', 'ciqintro', '69,70,71,72,73')"); + execute_sql("INSERT INTO `{$CFG->prefix}survey` (`course`, `template`, `days`, `timecreated`, `timemodified`, `name`, `intro`, `questions`) VALUES (0, 0, 0, 985017600, 985017600, 'ciqname', 'ciqintro', '69,70,71,72,73')"); execute_sql("INSERT INTO `{$CFG->prefix}survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (69, 'ciq1', 'ciq1short', '', '', 0, '')"); execute_sql("INSERT INTO `{$CFG->prefix}survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (70, 'ciq2', 'ciq2short', '', '', 0, '')"); execute_sql("INSERT INTO `{$CFG->prefix}survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (71, 'ciq3', 'ciq3short', '', '', 0, '')"); diff --git a/mod/survey/db/postgres7.php b/mod/survey/db/postgres7.php index 24f4f41a9f..94c1764224 100644 --- a/mod/survey/db/postgres7.php +++ b/mod/survey/db/postgres7.php @@ -7,7 +7,7 @@ function survey_upgrade($oldversion) { global $CFG; if ($oldversion < 2004021601) { - modify_database("", "INSERT INTO `prefix_survey` (`id`, `course`, `template`, `days`, `timecreated`, `timemodified`, `name`, `intro`, `questions`) VALUES (5, 0, 0, 0, 985017600, 985017600, 'ciqname', 'ciqintro', '69,70,71,72,73')"); + modify_database("", "INSERT INTO `prefix_survey` (`course`, `template`, `days`, `timecreated`, `timemodified`, `name`, `intro`, `questions`) VALUES (0, 0, 0, 985017600, 985017600, 'ciqname', 'ciqintro', '69,70,71,72,73')"); modify_database("", "INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (69, 'ciq1', 'ciq1short', '', '', 0, '')"); modify_database("", "INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (70, 'ciq2', 'ciq2short', '', '', 0, '')"); modify_database("", "INSERT INTO `prefix_survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (71, 'ciq3', 'ciq3short', '', '', 0, '')"); -- 2.39.5