Index: lams_tool_chat/db/sql/create_lams_tool_chat.sql =================================================================== diff -u -rb870f1d2089affc9df675604f5d509c86b9d1b78 -rbaf28fc85c1834d255f8dd2acf6844ea6802a5c5 --- lams_tool_chat/db/sql/create_lams_tool_chat.sql (.../create_lams_tool_chat.sql) (revision b870f1d2089affc9df675604f5d509c86b9d1b78) +++ lams_tool_chat/db/sql/create_lams_tool_chat.sql (.../create_lams_tool_chat.sql) (revision baf28fc85c1834d255f8dd2acf6844ea6802a5c5) @@ -37,8 +37,8 @@ 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, + from_user_uid bigint, + to_user_uid bigint, type varchar(255), body varchar(255), send_date datetime, @@ -69,8 +69,8 @@ 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 FKCC08C1DCCF3BF9B6 (from_user_uid), add constraint FKCC08C1DCCF3BF9B6 foreign key (from_user_uid) references tl_lachat11_user (uid); +alter table tl_lachat11_message add index FKCC08C1DC2AF61E05 (to_user_uid), add constraint FKCC08C1DC2AF61E05 foreign key (to_user_uid) 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 FK4EB82169C8469FC (chat_session_uid), add constraint FK4EB82169C8469FC foreign key (chat_session_uid) references tl_lachat11_session (uid); Index: lams_tool_chat/db/sql/table-schema.sql =================================================================== diff -u -rb870f1d2089affc9df675604f5d509c86b9d1b78 -rbaf28fc85c1834d255f8dd2acf6844ea6802a5c5 --- lams_tool_chat/db/sql/table-schema.sql (.../table-schema.sql) (revision b870f1d2089affc9df675604f5d509c86b9d1b78) +++ lams_tool_chat/db/sql/table-schema.sql (.../table-schema.sql) (revision baf28fc85c1834d255f8dd2acf6844ea6802a5c5) @@ -1,6 +1,6 @@ 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 FKCC08C1DCCF3BF9B6; +alter table tl_lachat11_message drop foreign key FKCC08C1DC2AF61E05; 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 FK4EB82169C8469FC; @@ -40,8 +40,8 @@ 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, + from_user_uid bigint, + to_user_uid bigint, type varchar(255), body varchar(255), send_date datetime, @@ -72,8 +72,8 @@ 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 FKCC08C1DCCF3BF9B6 (from_user_uid), add constraint FKCC08C1DCCF3BF9B6 foreign key (from_user_uid) references tl_lachat11_user (uid); +alter table tl_lachat11_message add index FKCC08C1DC2AF61E05 (to_user_uid), add constraint FKCC08C1DC2AF61E05 foreign key (to_user_uid) 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 FK4EB82169C8469FC (chat_session_uid), add constraint FK4EB82169C8469FC foreign key (chat_session_uid) references tl_lachat11_session (uid); Index: lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/model/ChatMessage.java =================================================================== diff -u -r70dbabea3214c441f5a63c747dd3f0a0f311594d -rbaf28fc85c1834d255f8dd2acf6844ea6802a5c5 --- lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/model/ChatMessage.java (.../ChatMessage.java) (revision 70dbabea3214c441f5a63c747dd3f0a0f311594d) +++ lams_tool_chat/src/java/org/lamsfoundation/lams/tool/chat/model/ChatMessage.java (.../ChatMessage.java) (revision baf28fc85c1834d255f8dd2acf6844ea6802a5c5) @@ -90,7 +90,7 @@ /** * @hibernate.many-to-one not-null="true" - * @hibernate.column name="from_user_id" + * @hibernate.column name="from_user_uid" * */ public ChatUser getFromUser() { @@ -103,7 +103,7 @@ /** * @hibernate.many-to-one not-null="false" - * @hibernate.column name="to_user_id" + * @hibernate.column name="to_user_uid" * * The toUser field is null when the type is "groupchat", and non null when * the type is "chat"