migrate-db-1.8.4-1.8.5-pre.sql 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. -- This script updates the databases structure before migrating the data from
  2. -- version 1.8.4 to version 1.8.5
  3. -- it is intended as a standalone script, however, because of the multiple
  4. -- databases related difficulties, it should be parsed by a PHP script in
  5. -- order to connect to and update the right databases.
  6. -- There is one line per query, allowing the PHP function file() to read
  7. -- all lines separately into an array. The xxMAINxx-type markers are there
  8. -- to tell the PHP script which database we're talking about.
  9. -- By always using the keyword "TABLE" in the queries, we should be able
  10. -- to retrieve and modify the table name from the PHP script if needed, which
  11. -- will allow us to deal with the unique-database-type installations
  12. --
  13. -- This first part is for the main database
  14. -- xxMAINxx
  15. ALTER TABLE settings_current ADD UNIQUE unique_setting (variable,subkey,category);
  16. ALTER TABLE settings_options ADD UNIQUE unique_setting_option (variable,value);
  17. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('extendedprofile_registration', 'mycomptetences', 'checkbox', 'User', 'false', 'ExtendedProfileRegistrationTitle', 'ExtendedProfileRegistrationComment', NULL, 'MyCompetences');
  18. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('extendedprofile_registration', 'mydiplomas', 'checkbox', 'User', 'false', 'ExtendedProfileRegistrationTitle', 'ExtendedProfileRegistrationComment', NULL, 'MyDiplomas');
  19. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('extendedprofile_registration', 'myteach', 'checkbox', 'User', 'false', 'ExtendedProfileRegistrationTitle', 'ExtendedProfileRegistrationComment', NULL, 'MyTeach');
  20. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('extendedprofile_registration', 'mypersonalopenarea', 'checkbox', 'User', 'false', 'ExtendedProfileRegistrationTitle', 'ExtendedProfileRegistrationComment', NULL, 'MyPersonalOpenArea');
  21. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('extendedprofile_registrationrequired', 'mycomptetences', 'checkbox', 'User', 'false', 'ExtendedProfileRegistrationRequiredTitle', 'ExtendedProfileRegistrationRequiredComment', NULL, 'MyCompetences');
  22. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('extendedprofile_registrationrequired', 'mydiplomas', 'checkbox', 'User', 'false', 'ExtendedProfileRegistrationRequiredTitle', 'ExtendedProfileRegistrationRequiredComment', NULL, 'MyDiplomas');
  23. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('extendedprofile_registrationrequired', 'myteach', 'checkbox', 'User', 'false', 'ExtendedProfileRegistrationRequiredTitle', 'ExtendedProfileRegistrationRequiredComment', NULL, 'MyTeach');
  24. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('extendedprofile_registrationrequired', 'mypersonalopenarea', 'checkbox', 'User', 'false', 'ExtendedProfileRegistrationRequiredTitle', 'ExtendedProfileRegistrationRequiredComment', NULL, 'MyPersonalOpenArea');
  25. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('noreply_email_address', '', 'textfield', 'Platform', '', 'NoReplyEmailAddress', 'NoReplyEmailAddressComment', NULL, NULL);
  26. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('survey_email_sender_noreply', '', 'radio', 'Course', 'coach', 'SurveyEmailSenderNoReply', 'SurveyEmailSenderNoReplyComment', NULL, NULL);
  27. INSERT INTO settings_options (variable, value, display_text) VALUES ('survey_email_sender_noreply', 'coach', 'CourseCoachEmailSender');
  28. INSERT INTO settings_options (variable, value, display_text) VALUES ('survey_email_sender_noreply', 'noreply', 'NoReplyEmailSender');
  29. DELETE FROM settings_current WHERE variable='show_student_view';
  30. DELETE FROM settings_options WHERE variable='show_student_view';
  31. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('openid_authentication', NULL, 'radio', 'Security', 'false', 'OpenIdAuthentication', 'OpenIdAuthenticationComment', NULL, NULL);
  32. INSERT INTO settings_options (variable, value, display_text) VALUES ('openid_authentication', 'true', 'Yes');
  33. INSERT INTO settings_options (variable, value, display_text) VALUES ('openid_authentication', 'false', 'No');
  34. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('profile','openid','checkbox','User','false','ProfileChangesTitle','ProfileChangesComment',NULL,'OpenIDURL');
  35. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('display_mini_month_calendar', '', 'radio', 'Tools', 'true', 'DisplayMiniMonthCalendarTitle', 'DisplayMiniMonthCalendarComment', NULL, NULL);
  36. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('display_upcoming_events', '', 'radio', 'Tools', 'true', 'DisplayUpcomingEventsTitle', 'DisplayUpcomingEventsComment', NULL, NULL);
  37. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('number_of_upcoming_events', '', 'textfield', 'Tools', '1', 'NumberOfUpcomingEventsTitle', 'NumberOfUpcomingEventsComment', NULL, NULL);
  38. INSERT INTO settings_options (variable, value, display_text) VALUES ('display_mini_month_calendar', 'true', 'Yes');
  39. INSERT INTO settings_options (variable, value, display_text) VALUES ('display_mini_month_calendar', 'false', 'No');
  40. INSERT INTO settings_options (variable, value, display_text) VALUES ('display_upcoming_events', 'true', 'Yes');
  41. INSERT INTO settings_options (variable, value, display_text) VALUES ('display_upcoming_events', 'false', 'No');
  42. CREATE TABLE templates (id int NOT NULL auto_increment, title varchar(100) NOT NULL, description varchar(250) NOT NULL, course_code varchar(40) NOT NULL, user_id int NOT NULL, ref_doc int NOT NULL, PRIMARY KEY (id));
  43. ALTER TABLE user ADD openid varchar(255) DEFAULT NULL;
  44. ALTER TABLE user ADD INDEX (openid(50));
  45. CREATE TABLE IF NOT EXISTS openid_association (id int NOT NULL auto_increment,idp_endpoint_uri text NOT NULL,session_type varchar(30) NOT NULL,assoc_handle text NOT NULL,assoc_type text NOT NULL,expires_in bigint NOT NULL,mac_key text NOT NULL,created bigint NOT NULL,PRIMARY KEY (id));
  46. CREATE TABLE gradebook_category ( id int NOT NULL auto_increment, name text NOT NULL, description text, user_id int NOT NULL, course_code varchar(40) default NULL, parent_id int default NULL, weight smallint NOT NULL, visible tinyint NOT NULL, certif_min_score int DEFAULT NULL, PRIMARY KEY (id));
  47. CREATE TABLE gradebook_evaluation ( id int unsigned NOT NULL auto_increment, name text NOT NULL, description text, user_id int NOT NULL, course_code varchar(40) default NULL, category_id int default NULL, date int default 0, weight smallint NOT NULL, max float unsigned NOT NULL, visible tinyint NOT NULL, PRIMARY KEY (id));
  48. CREATE TABLE gradebook_link ( id int NOT NULL auto_increment, type int NOT NULL, ref_id int NOT NULL, user_id int NOT NULL, course_code varchar(40) NOT NULL, category_id int NOT NULL, date int default NULL, weight smallint NOT NULL, visible tinyint NOT NULL, PRIMARY KEY (id));
  49. CREATE TABLE gradebook_result ( id int NOT NULL auto_increment, user_id int NOT NULL, evaluation_id int NOT NULL, date int NOT NULL, score float unsigned default NULL, PRIMARY KEY (id));
  50. CREATE TABLE gradebook_score_display ( id int NOT NULL auto_increment, score float unsigned NOT NULL, display varchar(40) NOT NULL, PRIMARY KEY (id));
  51. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('gradebook_enable', NULL, 'radio', 'Gradebook', 'false', 'GradebookActivation', 'GradebookActivationComment', NULL, NULL);
  52. INSERT INTO settings_options (variable, value, display_text) VALUES ('gradebook_enable', 'true', 'Yes');
  53. INSERT INTO settings_options (variable, value, display_text) VALUES ('gradebook_enable', 'false', 'No');
  54. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('show_tabs','my_gradebook','checkbox','Platform','true','ShowTabsTitle','ShowTabsComment',NULL,'TabsMyGradebook');
  55. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('gradebook_score_display_coloring', 'my_display_coloring', 'checkbox', 'Gradebook', 'false', 'GradebookScoreDisplayColoring', 'GradebookScoreDisplayColoringComment', NULL, 'TabsGradebookEnableColoring');
  56. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('gradebook_score_display_custom', 'my_display_custom', 'checkbox', 'Gradebook', 'false', 'GradebookScoreDisplayCustom', 'GradebookScoreDisplayCustomComment', NULL, 'TabsGradebookEnableCustom');
  57. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('gradebook_score_display_colorsplit', NULL, 'textfield', 'Gradebook', '50', 'GradebookScoreDisplayColorSplit', 'GradebookScoreDisplayColorSplitComment', NULL, NULL);
  58. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('gradebook_score_display_upperlimit', 'my_display_upperlimit', 'checkbox', 'Gradebook', 'false', 'GradebookScoreDisplayUpperLimit', 'GradebookScoreDisplayUpperLimitComment', NULL, 'TabsGradebookEnableUpperLimit');
  59. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('service_ppt2lp', 'port', 'checkbox', NULL, '2002', 'Port', NULL, NULL, NULL);
  60. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('user_selected_theme',NULL,'radio','Platform','false','UserThemeSelection','UserThemeSelectionComment',NULL,NULL);
  61. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('profile','theme','checkbox','User','false','ProfileChangesTitle','ProfileChangesComment',NULL,'UserTheme');
  62. INSERT INTO settings_options (variable, value, display_text) VALUES ('user_selected_theme', 'true', 'Yes');
  63. INSERT INTO settings_options (variable, value, display_text) VALUES ('user_selected_theme', 'false', 'No');
  64. ALTER TABLE user ADD theme varchar(255) DEFAULT NULL;
  65. ALTER TABLE user ADD hr_dept_id smallint unsigned NOT NULL default 0;
  66. UPDATE settings_current SET variable='service_visio', subkey='active' , title='VisioEnable' WHERE variable='service_visio' AND subkey='active';
  67. UPDATE settings_current SET variable='service_visio', subkey='visio_host', title='VisioHost' WHERE variable='service_visio' AND subkey='visio_rtmp_host_local';
  68. UPDATE settings_current SET variable='service_visio', subkey='visio_port', title='VisioPort' WHERE variable='service_visio' AND subkey='visio_rtmp_port';
  69. UPDATE settings_current SET variable='service_visio', subkey='visio_pass', title='VisioPassword', type='textfield' WHERE variable='service_visio' AND subkey='visio_rtmp_tunnel_port';
  70. DELETE FROM settings_options WHERE variable = 'visio_rtmp_host_local';
  71. DELETE FROM settings_current WHERE variable='service_visio' AND subkey='visioconference_url';
  72. DELETE FROM settings_current WHERE variable='service_visio' AND subkey='visioclassroom_url';
  73. DELETE FROM settings_current WHERE variable='service_visio' AND subkey='visio_is_web_rtmp';
  74. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('allow_course_theme',NULL,'radio','Course','true','AllowCourseThemeTitle','AllowCourseThemeComment',NULL,NULL);
  75. INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_course_theme', 'true', 'Yes');
  76. INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_course_theme', 'false', 'No');
  77. CREATE TABLE user_field (id INT NOT NULL auto_increment,field_type int NOT NULL DEFAULT 1,field_variable varchar(64) NOT NULL,field_display_text varchar(64),field_default_value text,field_order int,field_visible tinyint default 0,field_changeable tinyint default 0,tms TIMESTAMP,PRIMARY KEY(id));
  78. CREATE TABLE user_field_options (id int NOT NULL auto_increment,field_id int NOT NULL,option_value text,option_display_text varchar(64),option_order int,tms TIMESTAMP,PRIMARY KEY (id));
  79. CREATE TABLE user_field_values(id int NOT NULL auto_increment,user_id int NOT NULL,field_id int NOT NULL,field_value text,tms TIMESTAMP,PRIMARY KEY(id));
  80. ALTER TABLE session ADD session_admin_id INT UNSIGNED NOT NULL ;
  81. ALTER TABLE session ADD INDEX ( session_admin_id ) ;
  82. UPDATE course_module SET position='basic' WHERE name='survey';
  83. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('show_closed_courses',NULL,'radio','Platform','false','ShowClosedCoursesTitle','ShowClosedCoursesComment',NULL,NULL);
  84. INSERT INTO settings_options (variable, value, display_text) VALUES ('show_closed_courses', 'true', 'Yes');
  85. INSERT INTO settings_options (variable, value, display_text) VALUES ('show_closed_courses', 'false', 'No');
  86. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('ldap_main_server_address', NULL, 'textfield', 'LDAP', 'localhost', 'LDAPMainServerAddressTitle', 'LDAPMainServerAddressComment', NULL, NULL);
  87. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('ldap_main_server_port', NULL, 'textfield', 'LDAP', '389', 'LDAPMainServerPortTitle', 'LDAPMainServerPortComment', NULL, NULL);
  88. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('ldap_domain', NULL, 'textfield', 'LDAP', 'dc=nodomain', 'LDAPDomainTitle', 'LDAPDomainComment', NULL, NULL);
  89. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('ldap_replicate_server_address', NULL, 'textfield', 'LDAP', 'localhost', 'LDAPReplicateServerAddressTitle', 'LDAPReplicateServerAddressComment', NULL, NULL);
  90. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('ldap_replicate_server_port', NULL, 'textfield', 'LDAP', '389', 'LDAPReplicateServerPortTitle', 'LDAPReplicateServerPortComment', NULL, NULL);
  91. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('ldap_search_term', NULL, 'textfield', 'LDAP', '', 'LDAPSearchTermTitle', 'LDAPSearchTermComment', NULL, NULL);
  92. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('ldap_version', NULL, 'radio', 'LDAP', '3', 'LDAPVersionTitle', 'LDAPVersionComment', NULL, '');
  93. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('ldap_filled_tutor_field', NULL, 'textfield', 'LDAP', 'employeenumber', 'LDAPFilledTutorFieldTitle', 'LDAPFilledTutorFieldComment', NULL, '');
  94. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('ldap_authentication_login', NULL, 'textfield', 'LDAP', '', 'LDAPAuthenticationLoginTitle', 'LDAPAuthenticationLoginComment', NULL, '');
  95. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('ldap_authentication_password', NULL, 'textfield', 'LDAP', '', 'LDAPAuthenticationPasswordTitle', 'LDAPAuthenticationPasswordComment', NULL, '');
  96. INSERT INTO settings_options (variable, value, display_text) VALUES ('ldap_version', '2', 'LDAPVersion2');
  97. INSERT INTO settings_options (variable, value, display_text) VALUES ('ldap_version', '3', 'LDAPVersion3');
  98. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('service_visio', 'visio_use_rtmpt', 'radio', null, 'false', 'VisioUseRtmptTitle', 'VisioUseRtmptComment', NULL, '');
  99. INSERT INTO settings_options (variable, value, display_text) VALUES ('visio_use_rtmpt', 'true', 'Yes');
  100. INSERT INTO settings_options (variable, value, display_text) VALUES ('visio_use_rtmpt', 'false', 'No');
  101. ALTER TABLE settings_current ADD COLUMN access_url int unsigned not null default 1;
  102. ALTER TABLE settings_current ADD COLUMN access_url_changeable int unsigned not null default 0;
  103. ALTER TABLE settings_current ADD INDEX (access_url);
  104. CREATE TABLE access_url(id int unsigned NOT NULL auto_increment, url varchar(255) NOT NULL default 'http://localhost/', description text, active int unsigned not null default 0, created_by int not null, tms TIMESTAMP, PRIMARY KEY (id));
  105. INSERT INTO access_url(url,description,active,created_by) VALUES ('http://localhost/','URL 1',1,1);
  106. INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('ldap_filled_tutor_field_value', NULL, 'textfield', 'LDAP', '', 'LDAPFilledTutorFieldValueTitle', 'LDAPFilledTutorFieldValueComment', NULL, '');
  107. -- xxSTATSxx
  108. ALTER TABLE track_e_downloads ADD INDEX (down_user_id);
  109. ALTER TABLE track_e_downloads ADD INDEX (down_cours_id);
  110. ALTER TABLE track_e_exercices ADD INDEX (exe_cours_id);
  111. ALTER TABLE track_e_hotpotatoes ADD INDEX (exe_user_id);
  112. ALTER TABLE track_e_hotpotatoes ADD INDEX (exe_cours_id);
  113. ALTER TABLE track_e_lastaccess ADD INDEX (access_session_id);
  114. ALTER TABLE track_e_links ADD INDEX (links_cours_id);
  115. ALTER TABLE track_e_links ADD INDEX (links_user_id);
  116. ALTER TABLE track_e_uploads ADD INDEX (upload_user_id);
  117. ALTER TABLE track_e_uploads ADD INDEX (upload_cours_id);
  118. ALTER TABLE track_e_attempt ADD tms datetime not null default '0000-00-00 00:00:00';
  119. -- xxUSERxx
  120. CREATE TABLE personal_agenda_repeat (cal_id INT DEFAULT 0 NOT NULL, cal_type VARCHAR(20), cal_end INT, cal_frequency INT DEFAULT 1, cal_days CHAR(7), PRIMARY KEY (cal_id));
  121. CREATE TABLE personal_agenda_repeat_not (cal_id INT NOT NULL, cal_date INT NOT NULL, PRIMARY KEY ( cal_id, cal_date ));
  122. ALTER TABLE personal_agenda ADD parent_event_id INT NULL;
  123. -- xxCOURSExx
  124. CREATE TABLE lp_iv_objective(id bigint unsigned primary key auto_increment, lp_iv_id bigint unsigned not null, order_id smallint unsigned not null default 0, objective_id varchar(255) not null default '', score_raw float unsigned not null default 0, score_max float unsigned not null default 0, score_min float unsigned not null default 0, status char(32) not null default 'not attempted');
  125. ALTER TABLE lp_iv_objective ADD INDEX (lp_iv_id);
  126. ALTER TABLE lp_item CHANGE prerequisite prerequisite TEXT DEFAULT NULL;
  127. INSERT INTO course_setting(variable,value,category) VALUES ('email_alert_manager_on_new_quiz',0,'quiz');
  128. ALTER TABLE dropbox_post ADD session_id SMALLINT UNSIGNED NOT NULL ;
  129. ALTER TABLE dropbox_post ADD INDEX ( session_id ) ;
  130. ALTER TABLE dropbox_file ADD session_id SMALLINT UNSIGNED NOT NULL ;
  131. ALTER TABLE dropbox_file ADD INDEX ( session_id ) ;
  132. ALTER TABLE item_property ADD INDEX idx_item_property_toolref (tool,ref);
  133. ALTER TABLE forum_forum ADD session_id SMALLINT UNSIGNED DEFAULT 0 ;
  134. INSERT INTO course_setting(variable,value,category) VALUES ('allow_user_image_forum',1,'forum');
  135. INSERT INTO course_setting(variable,value,category) VALUES ('course_theme','','theme');
  136. INSERT INTO course_setting(variable,value,category) VALUES ('allow_learning_path_theme','1','theme');
  137. ALTER TABLE forum_post ADD INDEX idx_forum_post_thread_id (thread_id);
  138. ALTER TABLE forum_post ADD INDEX idx_forum_post_visible (visible);
  139. ALTER TABLE forum_thread ADD INDEX idx_forum_thread_forum_id (forum_id);
  140. ALTER TABLE student_publication ADD COLUMN filetype SET('file','folder') NOT NULL DEFAULT 'file' AFTER sent_date;
  141. ALTER TABLE document ADD readonly TINYINT UNSIGNED NOT NULL ;
  142. ALTER TABLE quiz ADD results_disabled TINYINT UNSIGNED NOT NULL DEFAULT 0;
  143. CREATE TABLE blog_attachment ( id int unsigned NOT NULL auto_increment, path varchar(255) NOT NULL COMMENT 'the real filename', comment text, size int NOT NULL default '0', post_id int NOT NULL, filename varchar(255) NOT NULL COMMENT 'the user s file name', blog_id int NOT NULL, comment_id int NOT NULL default '0', PRIMARY KEY (id));
  144. CREATE TABLE forum_attachment (id int NOT NULL auto_increment, path varchar(255) NOT NULL, comment text, size int NOT NULL default 0, post_id int NOT NULL, filename varchar(255) NOT NULL, PRIMARY KEY (id));
  145. ALTER TABLE group_category ADD forum_state TINYINT DEFAULT 0 AFTER announcements_state;
  146. UPDATE tool SET category='interaction', admin='0', visibility='0' WHERE name='survey';
  147. CREATE TABLE forum_notification (user_id int(11) , forum_id varchar(11), thread_id varchar(11), post_id varchar(11), KEY user_id (user_id), KEY forum_id (forum_id));
  148. ALTER TABLE quiz ADD access_condition text DEFAULT NULL;
  149. ALTER TABLE survey ADD access_condition text DEFAULT NULL;
  150. UPDATE tool SET category='authoring' WHERE name = 'announcement';
  151. CREATE TABLE calendar_event_repeat (cal_id INT DEFAULT 0 NOT NULL, cal_type VARCHAR(20), cal_end INT, cal_frequency INT DEFAULT 1, cal_days CHAR(7), PRIMARY KEY (cal_id));
  152. CREATE TABLE calendar_event_repeat_not (cal_id INT NOT NULL, cal_date INT NOT NULL, PRIMARY KEY ( cal_id, cal_date ));
  153. ALTER TABLE calendar_event ADD parent_event_id INT NULL;
  154. ALTER TABLE lp ADD theme varchar(255) not null default '';