Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/dbupdates/patch20081118_updateFrom22.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/dbupdates/patch20081118_updateFrom22.sql,v diff -u -r1.1 -r1.1.4.1 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/dbupdates/patch20081118_updateFrom22.sql 9 Dec 2008 05:40:32 -0000 1.1 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/dbupdates/patch20081118_updateFrom22.sql 6 May 2009 00:44:15 -0000 1.1.4.1 @@ -7,6 +7,21 @@ UPDATE lams_tool SET pedagogical_planner_url='tool/lafrum11/authoring/initPedagogicalPlannerForm.do' WHERE tool_signature='lafrum11'; +-- timestamp table +create table tl_lafrum11_timestamp ( + uid BIGINT(20) not null auto_increment, + message_uid BIGINT(20) not null, + timestamp_date DATETIME not null, + forum_user_uid BIGINT(20) not null, + primary key (`uid`), + unique key `uid` (`uid`), + key `message_uid` (`message_uid`), + key `forum_user_uid` (`forum_user_uid`) +)TYPE=InnoDB; + +alter table tl_lafrum11_timestamp add index ForumUserFK (forum_user_uid), add constraint ForumUserFK foreign key (forum_user_uid) references tl_lafrum11_forum_user (uid); +alter table tl_lafrum11_timestamp add index MessageFK (message_uid), add constraint MessageFK foreign key (message_uid) references tl_lafrum11_message (uid); + ----------------------Put all sql statements above here------------------------- -- If there were no errors, commit and restore autocommit to on