From: moodler <moodler>
Date: Tue, 17 Feb 2004 03:58:06 +0000 (+0000)
Subject: Don't specify id on upgrades!  Thanks, Eloy!
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f4da2ed4d764fb2fea77ca6bc007f0581f6d287e;p=moodle.git

Don't specify id on upgrades!  Thanks, Eloy!
---

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, '')");