adding some strings
[moodle-linuxchix.git] / mod / survey / db / mysql.php
blob9518aa4b14672d095d5bcb39cc89ba5f72daeefa
1 <?php // $Id$
3 // THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
4 //
5 // IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
6 // LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
8 function survey_upgrade($oldversion) {
9 // This function does anything necessary to upgrade
10 // older versions to match current functionality
12 global $CFG;
14 if ($oldversion < 2002081400) {
16 execute_sql(" ALTER TABLE `survey_questions` DROP `owner` ");
17 execute_sql(" ALTER TABLE `survey_questions` ADD `shorttext` VARCHAR(30) NOT NULL AFTER `text` ");
19 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'focus on interesting issues' WHERE id = 1 ");
20 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'important to my practice' WHERE id = 2 ");
21 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'improve my practice' WHERE id = 3 ");
22 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'connects with my practice' WHERE id = 4 ");
23 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'I\'m critical of my learning' WHERE id = 5 ");
24 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'I\'m critical of my own ideas' WHERE id = 6 ");
25 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'I\'m critical of other students' WHERE id = 7 ");
26 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'I\'m critical of readings' WHERE id = 8 ");
27 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'I explain my ideas' WHERE id = 9 ");
28 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'I ask for explanations' WHERE id =10 ");
29 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'I\'m asked to explain' WHERE id =11 ");
30 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'students respond to me' WHERE id =12 ");
31 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'tutor stimulates thinking' WHERE id =13 ");
32 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'tutor encourages me' WHERE id =14 ");
33 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'tutor models discourse' WHERE id =15 ");
34 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'tutor models self-reflection' WHERE id =16 ");
35 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'students encourage me' WHERE id =17 ");
36 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'students praise me' WHERE id =18 ");
37 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'students value me' WHERE id =19 ");
38 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'student empathise' WHERE id =20 ");
39 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'I understand other students' WHERE id =21 ");
40 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'students understand me' WHERE id =22 ");
41 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'I understand the tutor' WHERE id =23 ");
42 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'tutor understands me' WHERE id =24 ");
43 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'Relevance' WHERE id =25 ");
44 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'Reflective Thinking' WHERE id =26 ");
45 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'Interactivity' WHERE id =27 ");
46 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'Tutor Support' WHERE id =28 ");
47 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'Peer Support' WHERE id =29 ");
48 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'Interpretation' WHERE id =30 ");
49 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'Relevance' WHERE id =31 ");
50 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'Reflective Thinking' WHERE id =32 ");
51 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'Interactivity' WHERE id =33 ");
52 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'Tutor Support' WHERE id =34 ");
53 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =35 ");
54 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =36 ");
55 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =37 ");
56 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =38 ");
57 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =39 ");
58 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =40 ");
59 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =41 ");
60 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =42 ");
61 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =43 ");
62 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =44 ");
63 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'focus quality of argument' WHERE id =45 ");
64 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'play devil\'s advocate' WHERE id =46 ");
65 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'where people come from' WHERE id =47 ");
66 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'understand different people' WHERE id =48 ");
67 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'interact with variety' WHERE id =49 ");
68 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'enjoy hearing opinions' WHERE id =50 ");
69 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'strengthen by argue' WHERE id =51 ");
70 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'know why people do' WHERE id =52 ");
71 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'argue with authors' WHERE id =53 ");
72 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'remain objective' WHERE id =54 ");
73 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'think WITH people' WHERE id =55 ");
74 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'use criteria to evaluate' WHERE id =56 ");
75 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'try to understand' WHERE id =57 ");
76 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'point out weaknesses' WHERE id =58 ");
77 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'put myself in their shoes' WHERE id =59 ");
78 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'putting on trial' WHERE id =60 ");
79 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'i value logic most' WHERE id =61 ");
80 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'insight from empathy' WHERE id =62 ");
81 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'make effort to extend' WHERE id =63 ");
82 execute_sql(" UPDATE `survey_questions` SET `shorttext` = 'what\'s wrong\?' WHERE id =64 ");
83 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =65 ");
84 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =66 ");
85 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =67 ");
86 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =68 ");
87 execute_sql(" UPDATE `survey_questions` SET `shorttext` = '' WHERE id =69 ");
91 if ($oldversion < 2002110903) {
92 if (! execute_sql("ALTER TABLE `survey_questions` ADD `shorttext` VARCHAR(30) NOT NULL AFTER `text` ")) {
93 notify("If you get an error above, don't worry, just ignore it. Everything is OK.");
96 execute_sql("UPDATE `survey` SET `name` = 'collesaname', `intro` = 'collesaintro' WHERE name = 'COLLES (Actual)' AND template = 0 ");
97 execute_sql("UPDATE `survey` SET `name` = 'collespname', `intro` = 'collespintro' WHERE name = 'COLLES (Preferred)' AND template = 0");
98 execute_sql("UPDATE `survey` SET `name` = 'collesapname', `intro` = 'collesapintro' WHERE name = 'COLLES (Preferred and Actual)' AND template = 0");
99 execute_sql("UPDATE `survey` SET `name` = 'attlsname', `intro` = 'attlsintro' WHERE name = 'ATTLS (20 item version)' AND template = 0");
101 execute_sql("UPDATE `survey_questions` SET `text` = 'colles1', `shorttext` = 'colles1short', `options` = 'scaletimes5' WHERE `shorttext` = 'focus on interesting issues'");
102 execute_sql("UPDATE `survey_questions` SET `text` = 'colles2', `shorttext` = 'colles2short', `options` = 'scaletimes5' WHERE `shorttext` = 'important to my practice'");
103 execute_sql("UPDATE `survey_questions` SET `text` = 'colles3', `shorttext` = 'colles3short', `options` = 'scaletimes5' WHERE `shorttext` = 'improve my practice'");
104 execute_sql("UPDATE `survey_questions` SET `text` = 'colles4', `shorttext` = 'colles4short', `options` = 'scaletimes5' WHERE `shorttext` = 'connects with my practice'");
105 execute_sql("UPDATE `survey_questions` SET `text` = 'colles5', `shorttext` = 'colles5short', `options` = 'scaletimes5' WHERE `shorttext` = 'I\'m critical of my learning'");
106 execute_sql("UPDATE `survey_questions` SET `text` = 'colles6', `shorttext` = 'colles6short', `options` = 'scaletimes5' WHERE `shorttext` = 'I\'m critical of my own ideas'");
107 execute_sql("UPDATE `survey_questions` SET `text` = 'colles7', `shorttext` = 'colles7short', `options` = 'scaletimes5' WHERE `shorttext` = 'I\'m critical of other students'");
108 execute_sql("UPDATE `survey_questions` SET `text` = 'colles8', `shorttext` = 'colles8short', `options` = 'scaletimes5' WHERE `shorttext` = 'I\'m critical of readings'");
109 execute_sql("UPDATE `survey_questions` SET `text` = 'colles9', `shorttext` = 'colles9short', `options` = 'scaletimes5' WHERE `shorttext` = 'I explain my ideas'");
110 execute_sql("UPDATE `survey_questions` SET `text` = 'colles10', `shorttext` = 'colles10short', `options` = 'scaletimes5' WHERE `shorttext` = 'I ask for explanations'");
111 execute_sql("UPDATE `survey_questions` SET `text` = 'colles11', `shorttext` = 'colles11short', `options` = 'scaletimes5' WHERE `shorttext` = 'I\'m asked to explain'");
112 execute_sql("UPDATE `survey_questions` SET `text` = 'colles12', `shorttext` = 'colles12short', `options` = 'scaletimes5' WHERE `shorttext` = 'students respond to me'");
113 execute_sql("UPDATE `survey_questions` SET `text` = 'colles13', `shorttext` = 'colles13short', `options` = 'scaletimes5' WHERE `shorttext` = 'tutor stimulates thinking'");
114 execute_sql("UPDATE `survey_questions` SET `text` = 'colles14', `shorttext` = 'colles14short', `options` = 'scaletimes5' WHERE `shorttext` = 'tutor encourages me'");
115 execute_sql("UPDATE `survey_questions` SET `text` = 'colles15', `shorttext` = 'colles15short', `options` = 'scaletimes5' WHERE `shorttext` = 'tutor models discourse'");
116 execute_sql("UPDATE `survey_questions` SET `text` = 'colles16', `shorttext` = 'colles16short', `options` = 'scaletimes5' WHERE `shorttext` = 'tutor models self-reflection'");
117 execute_sql("UPDATE `survey_questions` SET `text` = 'colles17', `shorttext` = 'colles17short', `options` = 'scaletimes5' WHERE `shorttext` = 'students encourage me'");
118 execute_sql("UPDATE `survey_questions` SET `text` = 'colles18', `shorttext` = 'colles18short', `options` = 'scaletimes5' WHERE `shorttext` = 'students praise me'");
119 execute_sql("UPDATE `survey_questions` SET `text` = 'colles19', `shorttext` = 'colles19short', `options` = 'scaletimes5' WHERE `shorttext` = 'students value me'");
120 execute_sql("UPDATE `survey_questions` SET `text` = 'colles20', `shorttext` = 'colles20short', `options` = 'scaletimes5' WHERE `shorttext` = 'student empathise'");
121 execute_sql("UPDATE `survey_questions` SET `text` = 'colles21', `shorttext` = 'colles21short', `options` = 'scaletimes5' WHERE `shorttext` = 'I understand other students'");
122 execute_sql("UPDATE `survey_questions` SET `text` = 'colles22', `shorttext` = 'colles22short', `options` = 'scaletimes5' WHERE `shorttext` = 'students understand me'");
123 execute_sql("UPDATE `survey_questions` SET `text` = 'colles23', `shorttext` = 'colles23short', `options` = 'scaletimes5' WHERE `shorttext` = 'I understand the tutor'");
124 execute_sql("UPDATE `survey_questions` SET `text` = 'colles24', `shorttext` = 'colles24short', `options` = 'scaletimes5' WHERE `shorttext` = 'tutor understands me'");
126 execute_sql("UPDATE `survey_questions` SET `text` = 'collesm1', `shorttext` = 'collesm1short', `intro` = 'collesmintro', `options` = 'scaletimes5' WHERE `text` = 'Relevance'");
127 execute_sql("UPDATE `survey_questions` SET `text` = 'collesm2', `shorttext` = 'collesm2short', `intro` = 'collesmintro', `options` = 'scaletimes5' WHERE `text` = 'Reflective Thinking'");
128 execute_sql("UPDATE `survey_questions` SET `text` = 'collesm3', `shorttext` = 'collesm3short', `intro` = 'collesmintro', `options` = 'scaletimes5' WHERE `text` = 'Interactivity'");
129 execute_sql("UPDATE `survey_questions` SET `text` = 'collesm4', `shorttext` = 'collesm4short', `intro` = 'collesmintro', `options` = 'scaletimes5' WHERE `text` = 'Tutor Support'");
130 execute_sql("UPDATE `survey_questions` SET `text` = 'collesm5', `shorttext` = 'collesm5short', `intro` = 'collesmintro', `options` = 'scaletimes5' WHERE `text` = 'Peer Support'");
131 execute_sql("UPDATE `survey_questions` SET `text` = 'collesm6', `shorttext` = 'collesm6short', `intro` = 'collesmintro', `options` = 'scaletimes5' WHERE `text` = 'Interpretation'");
133 execute_sql("UPDATE `survey_questions` SET `text` = 'howlong', `options` = 'howlongoptions' WHERE `text` = 'How long did this survey take you to complete\?'");
134 execute_sql("UPDATE `survey_questions` SET `text` = 'othercomments' WHERE `text` = 'Do you have any other comments\?'");
136 execute_sql("UPDATE `survey_questions` SET `text` = 'attls1', `shorttext` = 'attls1short', `options` = 'scaleagree5' WHERE `shorttext` = 'focus quality of argument'");
137 execute_sql("UPDATE `survey_questions` SET `text` = 'attls2', `shorttext` = 'attls2short', `options` = 'scaleagree5' WHERE `shorttext` = 'play devil\'s advocate'");
138 execute_sql("UPDATE `survey_questions` SET `text` = 'attls3', `shorttext` = 'attls3short', `options` = 'scaleagree5' WHERE `shorttext` = 'where people come from'");
139 execute_sql("UPDATE `survey_questions` SET `text` = 'attls4', `shorttext` = 'attls4short', `options` = 'scaleagree5' WHERE `shorttext` = 'understand different people'");
140 execute_sql("UPDATE `survey_questions` SET `text` = 'attls5', `shorttext` = 'attls5short', `options` = 'scaleagree5' WHERE `shorttext` = 'interact with variety'");
141 execute_sql("UPDATE `survey_questions` SET `text` = 'attls6', `shorttext` = 'attls6short', `options` = 'scaleagree5' WHERE `shorttext` = 'enjoy hearing opinions'");
142 execute_sql("UPDATE `survey_questions` SET `text` = 'attls7', `shorttext` = 'attls7short', `options` = 'scaleagree5' WHERE `shorttext` = 'strengthen by argue'");
143 execute_sql("UPDATE `survey_questions` SET `text` = 'attls8', `shorttext` = 'attls8short', `options` = 'scaleagree5' WHERE `shorttext` = 'know why people do'");
144 execute_sql("UPDATE `survey_questions` SET `text` = 'attls9', `shorttext` = 'attls9short', `options` = 'scaleagree5' WHERE `shorttext` = 'argue with authors'");
145 execute_sql("UPDATE `survey_questions` SET `text` = 'attls10', `shorttext` = 'attls10short', `options` = 'scaleagree5' WHERE `shorttext` = 'remain objective'");
146 execute_sql("UPDATE `survey_questions` SET `text` = 'attls11', `shorttext` = 'attls11short', `options` = 'scaleagree5' WHERE `shorttext` = 'think WITH people'");
147 execute_sql("UPDATE `survey_questions` SET `text` = 'attls12', `shorttext` = 'attls12short', `options` = 'scaleagree5' WHERE `shorttext` = 'use criteria to evaluate'");
148 execute_sql("UPDATE `survey_questions` SET `text` = 'attls13', `shorttext` = 'attls13short', `options` = 'scaleagree5' WHERE `shorttext` = 'try to understand'");
149 execute_sql("UPDATE `survey_questions` SET `text` = 'attls14', `shorttext` = 'attls14short', `options` = 'scaleagree5' WHERE `shorttext` = 'point out weaknesses'");
150 execute_sql("UPDATE `survey_questions` SET `text` = 'attls15', `shorttext` = 'attls15short', `options` = 'scaleagree5' WHERE `shorttext` = 'put myself in their shoes'");
151 execute_sql("UPDATE `survey_questions` SET `text` = 'attls16', `shorttext` = 'attls16short', `options` = 'scaleagree5' WHERE `shorttext` = 'putting on trial'");
152 execute_sql("UPDATE `survey_questions` SET `text` = 'attls17', `shorttext` = 'attls17short', `options` = 'scaleagree5' WHERE `shorttext` = 'i value logic most'");
153 execute_sql("UPDATE `survey_questions` SET `text` = 'attls18', `shorttext` = 'attls18short', `options` = 'scaleagree5' WHERE `shorttext` = 'insight from empathy'");
154 execute_sql("UPDATE `survey_questions` SET `text` = 'attls19', `shorttext` = 'attls19short', `options` = 'scaleagree5' WHERE `shorttext` = 'make effort to extend'");
155 execute_sql("UPDATE `survey_questions` SET `text` = 'attls20', `shorttext` = 'attls20short', `options` = 'scaleagree5' WHERE `shorttext` = 'what\'s wrong\?'");
157 execute_sql("UPDATE `survey_questions` SET `text` = 'attlsm1', `shorttext` = 'attlsm1', `options` = 'scaleagree5', `intro` = 'attlsmintro' WHERE `text` = 'Attitudes Towards Thinking and Learning'");
158 execute_sql("UPDATE `survey_questions` SET `text` = 'attlsm2', `shorttext` = 'attlsm2', `options` = 'scaleagree5', `intro` = 'attlsmintro' WHERE `text` = 'Connected Learning'");
159 execute_sql("UPDATE `survey_questions` SET `text` = 'attlsm3', `shorttext` = 'attlsm3', `options` = 'scaleagree5', `intro` = 'attlsmintro' WHERE `text` = 'Separate Learning'");
161 if ($oldversion < 2002122300) {
162 execute_sql("ALTER TABLE `survey_analysis` CHANGE `user` `userid` INT(10) UNSIGNED DEFAULT '0' NOT NULL ");
163 execute_sql("ALTER TABLE `survey_answers` CHANGE `user` `userid` INT(10) UNSIGNED DEFAULT '0' NOT NULL ");
166 if ($oldversion < 2004021601) {
167 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')");
168 execute_sql("INSERT INTO `{$CFG->prefix}survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (69, 'ciq1', 'ciq1short', '', '', 0, '')");
169 execute_sql("INSERT INTO `{$CFG->prefix}survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (70, 'ciq2', 'ciq2short', '', '', 0, '')");
170 execute_sql("INSERT INTO `{$CFG->prefix}survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (71, 'ciq3', 'ciq3short', '', '', 0, '')");
171 execute_sql("INSERT INTO `{$CFG->prefix}survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (72, 'ciq4', 'ciq4short', '', '', 0, '')");
172 execute_sql("INSERT INTO `{$CFG->prefix}survey_questions` (`id`, `text`, `shorttext`, `multi`, `intro`, `type`, `options`) VALUES (73, 'ciq5', 'ciq5short', '', '', 0, '')");
175 if ($oldversion < 2004021602) {
176 table_column("survey_answers", "answer1", "answer1", "text", "", "", "");
177 table_column("survey_answers", "answer2", "answer2", "text", "", "", "");
180 if ($oldversion < 2004021900) {
181 modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'add', 'survey', 'name');");
182 modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('survey', 'update', 'survey', 'name');");
185 if ($oldversion < 2004111200) {
186 execute_sql("ALTER TABLE {$CFG->prefix}survey DROP INDEX course;",false);
187 execute_sql("ALTER TABLE {$CFG->prefix}survey_analysis DROP INDEX survey;",false);
188 execute_sql("ALTER TABLE {$CFG->prefix}survey_analysis DROP INDEX userid;",false);
189 execute_sql("ALTER TABLE {$CFG->prefix}survey_answers DROP INDEX userid;",false);
190 execute_sql("ALTER TABLE {$CFG->prefix}survey_answers DROP INDEX survey;",false);
191 execute_sql("ALTER TABLE {$CFG->prefix}survey_answers DROP INDEX question;",false);
193 modify_database('','ALTER TABLE prefix_survey ADD INDEX course (course);');
194 modify_database('','ALTER TABLE prefix_survey_analysis ADD INDEX survey (survey);');
195 modify_database('','ALTER TABLE prefix_survey_analysis ADD INDEX userid (userid);');
196 modify_database('','ALTER TABLE prefix_survey_answers ADD INDEX userid (userid);');
197 modify_database('','ALTER TABLE prefix_survey_answers ADD INDEX survey (survey);');
198 modify_database('','ALTER TABLE prefix_survey_answers ADD INDEX question (question);');
201 if ($oldversion < 2006042800) {
203 execute_sql("UPDATE {$CFG->prefix}survey SET questions='' WHERE questions IS NULL");
204 table_column('survey','questions','questions','varchar','255','','','not null');
206 execute_sql("UPDATE {$CFG->prefix}survey SET intro='' WHERE intro IS NULL");
207 table_column('survey','intro','intro','text','','','','not null');
209 execute_sql("UPDATE {$CFG->prefix}survey_answers SET time='0' WHERE time IS NULL");
210 table_column('survey_answers','time','time','int','10','unsigned','0','not null');
212 execute_sql("UPDATE {$CFG->prefix}survey_answers SET answer1='' WHERE answer1 IS NULL");
213 table_column('survey_answers','answer1','answer1','text','','','','not null');
215 execute_sql("UPDATE {$CFG->prefix}survey_answers SET answer2='' WHERE answer2 IS NULL");
216 table_column('survey_answers','answer2','answer2','text','','','','not null');
218 execute_sql("UPDATE {$CFG->prefix}survey_questions SET intro='' WHERE intro IS NULL");
219 table_column('survey_questions','intro','intro','varchar','50','','','not null');
222 ////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
224 return true;