Index: lams_tool_forum/db/sql/table-schema.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/db/sql/table-schema.sql,v
diff -u -r1.2 -r1.3
--- lams_tool_forum/db/sql/table-schema.sql	13 Oct 2005 02:06:08 -0000	1.2
+++ lams_tool_forum/db/sql/table-schema.sql	14 Oct 2005 06:23:47 -0000	1.3
@@ -1,6 +1,9 @@
+alter table tl_lafrum11_attachment drop foreign key FK389AD9A2290DA510;
 alter table tl_lafrum11_attachment drop foreign key FK389AD9A29EAD680D;
+alter table tl_lafrum11_message drop foreign key FK4A6067E837026725;
 alter table tl_lafrum11_message drop foreign key FK4A6067E8F7440FBC;
-alter table tl_lafrum11_message drop foreign key FK4A6067E89EAD680D;
+alter table tl_lafrum11_message drop foreign key FK4A6067E823DF1BD4;
+alter table tl_lafrum11_tool_session drop foreign key FK5A04D7AE9912CEA7;
 drop table if exists tl_lafrum11_attachment;
 drop table if exists tl_lafrum11_forum;
 drop table if exists tl_lafrum11_forum_learners;
@@ -12,6 +15,7 @@
    type varchar(255),
    file_name varchar(255),
    forum bigint,
+   toolSession bigint,
    primary key (uuid)
 );
 create table tl_lafrum11_forum (
@@ -28,14 +32,12 @@
    offline_instructions varchar(255),
    content_in_use bit,
    define_later bit,
-   tool_content_id bigint,
    primary key (uuid)
 );
 create table tl_lafrum11_forum_learners (
    uuid bigint not null auto_increment,
    user_id bigint,
    status bit,
-   session_id bigint,
    fullName varchar(255),
    userName varchar(255),
    primary key (uuid)
@@ -50,7 +52,8 @@
    body text,
    is_authored bit,
    is_anonymous bit,
-   FORUM bigint,
+   tool_session_id bigint,
+   learner_id bigint,
    parent bigint,
    primary key (uuid)
 );
@@ -59,10 +62,11 @@
    sessionEndDate datetime,
    sessionStartDate datetime,
    status integer,
-   toolContentId bigint,
-   toolSessionId bigint,
    primary key (uuid)
 );
+alter table tl_lafrum11_attachment add index FK389AD9A2290DA510 (toolSession), add constraint FK389AD9A2290DA510 foreign key (toolSession) references tl_lafrum11_message (uuid);
 alter table tl_lafrum11_attachment add index FK389AD9A29EAD680D (forum), add constraint FK389AD9A29EAD680D foreign key (forum) references tl_lafrum11_forum (uuid);
+alter table tl_lafrum11_message add index FK4A6067E837026725 (learner_id), add constraint FK4A6067E837026725 foreign key (learner_id) references tl_lafrum11_forum_learners (uuid);
 alter table tl_lafrum11_message add index FK4A6067E8F7440FBC (parent), add constraint FK4A6067E8F7440FBC foreign key (parent) references tl_lafrum11_message (uuid);
-alter table tl_lafrum11_message add index FK4A6067E89EAD680D (FORUM), add constraint FK4A6067E89EAD680D foreign key (FORUM) references tl_lafrum11_forum (uuid);
+alter table tl_lafrum11_message add index FK4A6067E823DF1BD4 (tool_session_id), add constraint FK4A6067E823DF1BD4 foreign key (tool_session_id) references tl_lafrum11_tool_session (uuid);
+alter table tl_lafrum11_tool_session add index FK5A04D7AE9912CEA7 (uuid), add constraint FK5A04D7AE9912CEA7 foreign key (uuid) references tl_lafrum11_forum (uuid);
