[svn r11015] Updated survey tables definition

skala
Yannick Warnier 18 years ago
parent 849436762a
commit 2b5d784657
  1. 10
      main/install/migrate-db-1.6.x-1.8.0-pre.sql

@ -166,11 +166,11 @@ ALTER TABLE user_course_category ADD sort int;
-- xxCOURSExx
-- trying to keep the same order in tables declaration as in add_course.lib.inc.php
CREATE TABLE survey(survey_id int unsigned NOT NULL auto_increment, code varchar(20) default NULL, title varchar(80) default NULL, subtitle varchar(80) default NULL, author varchar(20) default NULL, lang varchar(20) default NULL, avail_from date default NULL, avail_till date default NULL, is_shared char(1) default 1, template varchar(20) default NULL, intro text, surveythanks text, creation_date datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (survey_id), UNIQUE KEY id (survey_id));
CREATE TABLE survey_group(group_id int NOT NULL auto_increment, survey_id int NOT NULL default 0, groupname varchar(100) NOT NULL default '', introduction text NOT NULL, imported_group int NOT NULL default 0, db_name varchar(100) NULL default '', sortby int NOT NULL default 1, PRIMARY KEY (group_id));
CREATE TABLE questions(qid int unsigned NOT NULL auto_increment,gid int NOT NULL default 0, survey_id int NOT NULL default 0,qtype varchar(50) NOT NULL default '', caption text NOT NULL,alignment varchar(100) NOT NULL default '',sortby int NOT NULL default 1,a1 text NOT NULL,a2 text NOT NULL,a3 text NOT NULL,a4 text NOT NULL,a5 text NOT NULL,a6 text NOT NULL,a7 text NOT NULL,a8 text NOT NULL,a9 text NOT NULL,a10 text NOT NULL,at varchar(200) NOT NULL default '',ad varchar(200) NOT NULL default '',alt_text text NOT NULL, r1 int NOT NULL default 0,r2 int NOT NULL default 0,r3 int NOT NULL default 0,r4 int NOT NULL default 0,r5 int NOT NULL default 0,r6 int NOT NULL default 0,r7 int NOT NULL default 0,r8 int NOT NULL default 0,r9 int NOT NULL default 0,r10 int NOT NULL default 0, imported_question int NOT NULL default 0,db_name varchar(100) NULL default '',PRIMARY KEY (qid));
CREATE TABLE survey_report(id int NOT NULL auto_increment, qid int NOT NULL default 0, answer text NOT NULL, survey_id int NOT NULL default 0, user_id int NOT NULL default 0, PRIMARY KEY (id));
CREATE TABLE survey ( survey_id int unsigned NOT NULL auto_increment, code varchar(20) default NULL, title varchar(80) default NULL, subtitle varchar(80) default NULL, author varchar(20) default NULL, lang varchar(20) default NULL, avail_from date default NULL, avail_till date default NULL, is_shared char(1) default '1', template varchar(20) default NULL, intro text, surveythanks text, creation_date datetime NOT NULL default '0000-00-00 00:00:00', invited int NOT NULL, answered int NOT NULL, invite_mail text NOT NULL, reminder_mail text NOT NULL, PRIMARY KEY (survey_id));
CREATE TABLE survey_invitation (survey_invitation_id int unsigned NOT NULL auto_increment, survey_id int unsigned NOT NULL, user varchar(250) NOT NULL, invitation_code varchar(250) NOT NULL, invitation_date datetime NOT NULL, reminder_date datetime NOT NULL, 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, 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, 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;

Loading…
Cancel
Save