From c7984c7aafce9d042d305986e0f2c09247b90f57 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 31 Jul 2008 00:05:37 +0200 Subject: [PATCH] [svn r15873] Adding the "value" field in survey_question_option table see FS#2746 --- main/inc/lib/add_course.lib.inc.php | 1 + main/install/migrate-db-1.8.5-1.8.6-pre.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/main/inc/lib/add_course.lib.inc.php b/main/inc/lib/add_course.lib.inc.php index 44d35e4eea..ac1fdfc894 100644 --- a/main/inc/lib/add_course.lib.inc.php +++ b/main/inc/lib/add_course.lib.inc.php @@ -1440,6 +1440,7 @@ function update_Db_course($courseDbName) survey_id int unsigned NOT NULL, option_text text NOT NULL, sort int NOT NULL, + value int NOT NULL default '0', PRIMARY KEY (question_option_id) )"; $result = api_sql_query($sql, __FILE__, __LINE__) or die(mysql_error($sql)); diff --git a/main/install/migrate-db-1.8.5-1.8.6-pre.sql b/main/install/migrate-db-1.8.5-1.8.6-pre.sql index ffc4a86373..a76ab3f8fc 100644 --- a/main/install/migrate-db-1.8.5-1.8.6-pre.sql +++ b/main/install/migrate-db-1.8.5-1.8.6-pre.sql @@ -36,3 +36,4 @@ ALTER TABLE survey_question ADD survey_group_pri int unsigned NOT NULL default 0 ALTER TABLE survey_question ADD survey_group_sec1 int unsigned NOT NULL default 0; ALTER TABLE survey_question ADD survey_group_sec2 int unsigned NOT NULL default 0; CREATE TABLE survey_group ( id int unsigned NOT NULL auto_increment, name varchar(20) NOT NULL, description varchar(255) NOT NULL, survey_id int unsigned NOT NULL, PRIMARY KEY (id) ); +ALTER TABLE survey_question_option ADD value int NOT NULL default 0;