-- LDEV1511 make tables InnoDB
ALTER TABLE tl_larsrc11_attachment ENGINE=InnoDB;
ALTER TABLE tl_larsrc11_item_instruction ENGINE=InnoDB;
ALTER TABLE tl_larsrc11_item_log ENGINE=InnoDB;
ALTER TABLE tl_larsrc11_resource ENGINE=InnoDB;
ALTER TABLE tl_larsrc11_resource_item ENGINE=InnoDB;
ALTER TABLE tl_larsrc11_session ENGINE=InnoDB;
ALTER TABLE tl_larsrc11_user ENGINE=InnoDB;
alter table tl_larsrc11_attachment add foreign key (resource_uid) references tl_larsrc11_resource (uid);
alter table tl_larsrc11_item_instruction add foreign key (item_uid) references tl_larsrc11_resource_item (uid);
alter table tl_larsrc11_resource add foreign key (create_by) references tl_larsrc11_user (uid);
alter table tl_larsrc11_resource_item add foreign key (create_by) references tl_larsrc11_user (uid);
alter table tl_larsrc11_resource_item add foreign key (resource_uid) references tl_larsrc11_resource (uid);
alter table tl_larsrc11_resource_item add foreign key (session_uid) references tl_larsrc11_session (uid);
alter table tl_larsrc11_item_log add foreign key (resource_item_uid) references tl_larsrc11_resource_item (uid);
alter table tl_larsrc11_item_log add foreign key (user_uid) references tl_larsrc11_user (uid);
alter table tl_larsrc11_session add foreign key (resource_uid) references tl_larsrc11_resource (uid);
alter table tl_larsrc11_user add foreign key (session_uid) references tl_larsrc11_session (uid);
alter table tl_larsrc11_user add foreign key (resource_uid) references tl_larsrc11_resource (uid);
UPDATE lams_tool SET modified_date_time = NOW() WHERE tool_signature = "larsrc11";
UPDATE lams_tool SET tool_version = "20080229" WHERE tool_signature = "larsrc11";
