From 810ad5a9ccb4ae8a89088a97a6231117d5f83377 Mon Sep 17 00:00:00 2001 From: Julian Prud'homme Date: Thu, 3 May 2007 14:30:00 +0200 Subject: [PATCH] [svn r12258] Change the type of the field option_id from int to text in the course table --- main/inc/lib/add_course.lib.inc.php | 2 +- main/install/migrate-db-1.6.x-1.8.0-pre.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main/inc/lib/add_course.lib.inc.php b/main/inc/lib/add_course.lib.inc.php index a0f9919cf9..da63ee0793 100644 --- a/main/inc/lib/add_course.lib.inc.php +++ b/main/inc/lib/add_course.lib.inc.php @@ -1304,7 +1304,7 @@ function update_Db_course($courseDbName) answer_id int unsigned NOT NULL auto_increment, survey_id int unsigned NOT NULL, question_id int unsigned NOT NULL, - option_id int unsigned NOT NULL, + option_id TEXT NOT NULL, value int unsigned NOT NULL, user varchar(250) NOT NULL, PRIMARY KEY (answer_id) diff --git a/main/install/migrate-db-1.6.x-1.8.0-pre.sql b/main/install/migrate-db-1.6.x-1.8.0-pre.sql index 1389baf2e6..6caf4ea46d 100644 --- a/main/install/migrate-db-1.6.x-1.8.0-pre.sql +++ b/main/install/migrate-db-1.6.x-1.8.0-pre.sql @@ -171,7 +171,7 @@ CREATE TABLE survey ( survey_id int unsigned NOT NULL auto_increment, code varch CREATE TABLE survey_invitation (survey_invitation_id int unsigned NOT NULL auto_increment, survey_code varchar(20) NOT NULL, user varchar(250) NOT NULL, invitation_code varchar(250) NOT NULL, invitation_date datetime NOT NULL, reminder_date datetime NOT NULL, answered int(2) NOT NULL default '0', PRIMARY KEY (survey_invitation_id)); CREATE TABLE survey_question ( question_id int unsigned NOT NULL auto_increment, survey_id int unsigned NOT NULL, survey_question text NOT NULL, survey_question_comment text NOT NULL, type varchar(250) NOT NULL, display varchar(10) NOT NULL, sort int NOT NULL, shared_question_id int, max_value int, PRIMARY KEY (question_id) ); CREATE TABLE survey_question_option ( question_option_id int unsigned NOT NULL auto_increment, question_id int unsigned NOT NULL, survey_id int unsigned NOT NULL, option_text text NOT NULL, sort int NOT NULL, PRIMARY KEY (question_option_id) ); -CREATE TABLE survey_anwser (answer_id unsigned int NOT NULL auto_increment, survey_id int unsigned NOT NULL, question_id int NOT NULL, option_id int NOT NULL, value int unsigned not null, user varchar(250) NOT NULL, PRIMARY KEY (answer_id) ); +CREATE TABLE survey_anwser (answer_id unsigned int NOT NULL auto_increment, survey_id int unsigned NOT NULL, question_id int NOT NULL, option_id TEXT NOT NULL, value int unsigned not null, user varchar(250) NOT NULL, PRIMARY KEY (answer_id) ); ALTER TABLE announcement CHANGE content content mediumtext; ALTER TABLE announcement ADD email_sent tinyint default 0;