Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/dbupdates/patch20110228_updateTo236.sql =================================================================== diff -u -r8a8c14627918cc58fa845c2369937bc482d2f6b9 -r8d6cf04ec6c1da33edd6e1299ad87dad81eb3b8d --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/dbupdates/patch20110228_updateTo236.sql (.../patch20110228_updateTo236.sql) (revision 8a8c14627918cc58fa845c2369937bc482d2f6b9) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/dbupdates/patch20110228_updateTo236.sql (.../patch20110228_updateTo236.sql) (revision 8d6cf04ec6c1da33edd6e1299ad87dad81eb3b8d) @@ -5,26 +5,31 @@ ----------------------Put all sql statements below here------------------------- -ALTER TABLE tl_lafrum11_forum ADD COLUMN allow_rate_messages smallint; +ALTER TABLE tl_lafrum11_forum ADD COLUMN allow_rate_messages smallint not null default 0; -- LDEV-2651 Forum option to rate other student's postings CREATE TABLE tl_lafrum11_message_rating ( uid BIGINT(20) NOT NULL AUTO_INCREMENT , rating float , user_id BIGINT(20) NOT NULL - , response_id BIGINT(20) NOT NULL + , message_id BIGINT(20) NOT NULL , PRIMARY KEY (uid) , INDEX (user_id) , CONSTRAINT FK_tl_lafrum11_message_rating_1 FOREIGN KEY (user_id) REFERENCES tl_lafrum11_forum_user (uid) - , INDEX (response_id) - , CONSTRAINT FK_tl_lafrum11_message_rating_2 FOREIGN KEY (response_id) + , INDEX (message_id) + , CONSTRAINT FK_tl_lafrum11_message_rating_2 FOREIGN KEY (message_id) REFERENCES tl_lafrum11_message (uid) )TYPE=InnoDB; UPDATE lams_tool SET tool_version = "20110228" WHERE tool_signature = "lafrum11"; +-- LDEV-2657 +alter table tl_lafrum11_forum add column submission_deadline datetime default null; + +UPDATE lams_tool SET tool_version = "20110408" WHERE tool_signature = "lafrum11"; + ----------------------Put all sql statements above here------------------------- -- If there were no errors, commit and restore autocommit to on