Browse Source

Added to the database the new field chat_state to the table group_info and group_category DT#3318

Arthur Portugal 15 years ago
parent
commit
4e287877ee

+ 3 - 1
main/inc/lib/add_course.lib.inc.php

@@ -628,7 +628,7 @@ function update_Db_course($courseDbName)
 		start_time datetime NOT NULL default '0000-00-00 00:00:00',
 		end_time datetime NOT NULL default '0000-00-00 00:00:00',
 		feedback_type int NOT NULL default 0,
-    expired_time int NOT NULL default '0',
+    	expired_time int NOT NULL default '0',
 		session_id smallint default 0,
 		PRIMARY KEY (id)
 		)";
@@ -1001,6 +1001,7 @@ function update_Db_course($courseDbName)
 		announcements_state tinyint unsigned NOT NULL default 0,
 		forum_state tinyint unsigned NOT NULL default 0,
 		wiki_state tinyint unsigned NOT NULL default 1,
+		chat_state tinyint unsigned NOT NULL default 1,
 		secret_directory varchar(255) default NULL,
 		self_registration_allowed tinyint unsigned NOT NULL default '0',
 		self_unregistration_allowed tinyint unsigned NOT NULL default '0',
@@ -1019,6 +1020,7 @@ function update_Db_course($courseDbName)
 		announcements_state tinyint unsigned NOT NULL default 1,
 		forum_state tinyint unsigned NOT NULL default 1,
 		wiki_state tinyint unsigned NOT NULL default 1,
+		chat_state tinyint unsigned NOT NULL default 1,
 		max_student smallint unsigned NOT NULL default 8,
 		self_reg_allowed tinyint unsigned NOT NULL default 0,
 		self_unreg_allowed tinyint unsigned NOT NULL default 0,

+ 3 - 1
main/install/migrate-db-1.8.6.1-1.8.6.2-pre.sql

@@ -56,4 +56,6 @@ ALTER TABLE tool ADD COLUMN session_id smallint DEFAULT 0, ADD INDEX (session_id
 ALTER TABLE link_category ADD COLUMN session_id smallint DEFAULT 0, ADD INDEX (session_id);
 ALTER TABLE item_property ADD id_session INT NOT NULL DEFAULT 0;
 ALTER TABLE item_property DROP INDEX idx_item_property_toolref, ADD INDEX idx_item_property_toolref (tool, ref, id_session); 
-ALTER TABLE quiz ADD COLUMN expired_time int NOT NULL DEFAULT '0' AFTER feedback_type;
+ALTER TABLE quiz ADD COLUMN expired_time int NOT NULL DEFAULT '0' AFTER feedback_type;
+ALTER TABLE group_info ADD COLUMN chat_state TINYINT DEFAULT 1, ADD INDEX (chat_state);
+ALTER TABLE group_category ADD COLUMN chat_state TINYINT DEFAULT 1, ADD INDEX (chat_state);