Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dbupdates/patch20131212.sql =================================================================== diff -u -rc01bd4b6b818ad0e3bd91a9743a300f2a36f2047 -r401c59d4bc08a1bcdd5100e46c217aef80b7da05 --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dbupdates/patch20131212.sql (.../patch20131212.sql) (revision c01bd4b6b818ad0e3bd91a9743a300f2a36f2047) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dbupdates/patch20131212.sql (.../patch20131212.sql) (revision 401c59d4bc08a1bcdd5100e46c217aef80b7da05) @@ -5,6 +5,7 @@ -- LKC-40 -- Remove logs belong to all other users except leader +DROP TABLE IF EXISTS temp_select; CREATE TABLE temp_select AS SELECT group_leader_uid uid FROM tl_lascrt11_session WHERE group_leader_uid IS NOT NULL; ALTER TABLE temp_select ADD INDEX index1 (uid ASC); @@ -35,9 +36,9 @@ ALTER TABLE tl_lascrt11_scratchie_answer ADD INDEX FK_scratchie_answer_1 (scratchie_item_uid), ADD CONSTRAINT FK_scratchie_answer_1 FOREIGN KEY (scratchie_item_uid) REFERENCES tl_lascrt11_scratchie_item (uid); --Remove create_by from tl_lascrt11_scratchie -ALTER TABLE table tl_lascrt11_scratchie DROP FOREIGN KEY FK_NEW_610529188_89093BF758092FB; -ALTER TABLE table tl_lascrt11_scratchie DROP INDEX FK_NEW_610529188_89093BF758092FB; -ALTER TABLE table tl_lascrt11_scratchie DROP COLUMN create_by; +ALTER TABLE tl_lascrt11_scratchie DROP FOREIGN KEY FK_NEW_610529188_89093BF758092FB; +ALTER TABLE tl_lascrt11_scratchie DROP INDEX FK_NEW_610529188_89093BF758092FB; +ALTER TABLE tl_lascrt11_scratchie DROP COLUMN create_by; UPDATE lams_tool SET tool_version='20131212' WHERE tool_signature='lascrt11';