Index: lams_tool_chat/db/model/chat_tool.clay
===================================================================
diff -u -r7312ae351ea504413d8b1976d9ed866c91eceb95 -ra5627d0ca81534e8c424b280981a44d14d766888
--- lams_tool_chat/db/model/chat_tool.clay (.../chat_tool.clay) (revision 7312ae351ea504413d8b1976d9ed866c91eceb95)
+++ lams_tool_chat/db/model/chat_tool.clay (.../chat_tool.clay) (revision a5627d0ca81534e8c424b280981a44d14d766888)
@@ -12,9 +12,9 @@
-
+
-
+
@@ -95,7 +95,7 @@
-
+
@@ -114,9 +114,9 @@
-
+
-
+
@@ -218,6 +218,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -234,7 +246,7 @@
-
+
@@ -249,6 +261,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -289,24 +314,36 @@
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
+
-
@@ -325,11 +362,15 @@
+
+
+
+
-
+
-
+
@@ -416,7 +457,7 @@
-
+
@@ -435,9 +476,9 @@
-
+
-
+
@@ -493,7 +534,7 @@
-
+
@@ -513,22 +554,22 @@
-
+
-
+
-
+
-
+
Index: lams_tool_chat/db/sql/create_lams_tool_chat.sql
===================================================================
diff -u -r7312ae351ea504413d8b1976d9ed866c91eceb95 -ra5627d0ca81534e8c424b280981a44d14d766888
--- lams_tool_chat/db/sql/create_lams_tool_chat.sql (.../create_lams_tool_chat.sql) (revision 7312ae351ea504413d8b1976d9ed866c91eceb95)
+++ lams_tool_chat/db/sql/create_lams_tool_chat.sql (.../create_lams_tool_chat.sql) (revision a5627d0ca81534e8c424b280981a44d14d766888)
@@ -30,14 +30,19 @@
content_in_use bit,
define_later bit,
tool_content_id bigint,
+ filtering_enabled bit,
+ filter_keywords text,
primary key (uid)
);
create table tl_lachat11_message (
uid bigint not null auto_increment,
+ chat_session_uid bigint not null,
from_user_id bigint,
to_user_id bigint,
type varchar(255),
body varchar(255),
+ send_date datetime,
+ hidden bit,
primary key (uid)
);
create table tl_lachat11_session (
@@ -58,16 +63,17 @@
login_name varchar(255),
first_name varchar(255),
jabber_id varchar(255),
- session_id bigint,
+ chat_session_uid bigint,
primary key (uid)
);
alter table tl_lachat11_attachment add index FK9ED6CB2E1A3926E3 (chat_uid), add constraint FK9ED6CB2E1A3926E3 foreign key (chat_uid) references tl_lachat11_chat (uid);
alter table tl_lachat11_message add index FKCC08C1DCC15A415F (from_user_id), add constraint FKCC08C1DCC15A415F foreign key (from_user_id) references tl_lachat11_user (uid);
alter table tl_lachat11_message add index FKCC08C1DC50B2D730 (to_user_id), add constraint FKCC08C1DC50B2D730 foreign key (to_user_id) references tl_lachat11_user (uid);
+alter table tl_lachat11_message add index FKCC08C1DC9C8469FC (chat_session_uid), add constraint FKCC08C1DC9C8469FC foreign key (chat_session_uid) references tl_lachat11_session (uid);
alter table tl_lachat11_session add index FK96E446B1A3926E3 (chat_uid), add constraint FK96E446B1A3926E3 foreign key (chat_uid) references tl_lachat11_chat (uid);
-alter table tl_lachat11_user add index FK4EB8216C10360A0 (session_id), add constraint FK4EB8216C10360A0 foreign key (session_id) references tl_lachat11_session (uid);
+alter table tl_lachat11_user add index FK4EB82169C8469FC (chat_session_uid), add constraint FK4EB82169C8469FC foreign key (chat_session_uid) references tl_lachat11_session (uid);
-INSERT INTO tl_lachat11_chat (title,instructions,online_instructions,offline_instructions,tool_content_id,run_offline,lock_on_finished,content_in_use,define_later)
-VALUES("LAMS Chat","Chat Instruction","Online instructions","Offline instructions",${default_content_id},0,0,0,0);
+INSERT INTO tl_lachat11_chat (title,instructions,online_instructions,offline_instructions,tool_content_id,run_offline,lock_on_finished,filtering_enabled, content_in_use,define_later)
+VALUES("LAMS Chat","Chat Instruction","Online instructions","Offline instructions",${default_content_id},0,0,0,0,0);
SET FOREIGN_KEY_CHECKS=1;
\ No newline at end of file
Index: lams_tool_chat/db/sql/table-schema.sql
===================================================================
diff -u -r7312ae351ea504413d8b1976d9ed866c91eceb95 -ra5627d0ca81534e8c424b280981a44d14d766888
--- lams_tool_chat/db/sql/table-schema.sql (.../table-schema.sql) (revision 7312ae351ea504413d8b1976d9ed866c91eceb95)
+++ lams_tool_chat/db/sql/table-schema.sql (.../table-schema.sql) (revision a5627d0ca81534e8c424b280981a44d14d766888)
@@ -1,8 +1,9 @@
alter table tl_lachat11_attachment drop foreign key FK9ED6CB2E1A3926E3;
alter table tl_lachat11_message drop foreign key FKCC08C1DCC15A415F;
alter table tl_lachat11_message drop foreign key FKCC08C1DC50B2D730;
+alter table tl_lachat11_message drop foreign key FKCC08C1DC9C8469FC;
alter table tl_lachat11_session drop foreign key FK96E446B1A3926E3;
-alter table tl_lachat11_user drop foreign key FK4EB8216C10360A0;
+alter table tl_lachat11_user drop foreign key FK4EB82169C8469FC;
drop table if exists tl_lachat11_attachment;
drop table if exists tl_lachat11_chat;
drop table if exists tl_lachat11_message;
@@ -32,14 +33,19 @@
content_in_use bit,
define_later bit,
tool_content_id bigint,
+ filtering_enabled bit,
+ filter_keywords text,
primary key (uid)
);
create table tl_lachat11_message (
uid bigint not null auto_increment,
+ chat_session_uid bigint not null,
from_user_id bigint,
to_user_id bigint,
type varchar(255),
body varchar(255),
+ send_date datetime,
+ hidden bit,
primary key (uid)
);
create table tl_lachat11_session (
@@ -60,11 +66,12 @@
login_name varchar(255),
first_name varchar(255),
jabber_id varchar(255),
- session_id bigint,
+ chat_session_uid bigint,
primary key (uid)
);
alter table tl_lachat11_attachment add index FK9ED6CB2E1A3926E3 (chat_uid), add constraint FK9ED6CB2E1A3926E3 foreign key (chat_uid) references tl_lachat11_chat (uid);
alter table tl_lachat11_message add index FKCC08C1DCC15A415F (from_user_id), add constraint FKCC08C1DCC15A415F foreign key (from_user_id) references tl_lachat11_user (uid);
alter table tl_lachat11_message add index FKCC08C1DC50B2D730 (to_user_id), add constraint FKCC08C1DC50B2D730 foreign key (to_user_id) references tl_lachat11_user (uid);
+alter table tl_lachat11_message add index FKCC08C1DC9C8469FC (chat_session_uid), add constraint FKCC08C1DC9C8469FC foreign key (chat_session_uid) references tl_lachat11_session (uid);
alter table tl_lachat11_session add index FK96E446B1A3926E3 (chat_uid), add constraint FK96E446B1A3926E3 foreign key (chat_uid) references tl_lachat11_chat (uid);
-alter table tl_lachat11_user add index FK4EB8216C10360A0 (session_id), add constraint FK4EB8216C10360A0 foreign key (session_id) references tl_lachat11_session (uid);
+alter table tl_lachat11_user add index FK4EB82169C8469FC (chat_session_uid), add constraint FK4EB82169C8469FC foreign key (chat_session_uid) references tl_lachat11_session (uid);