-- LDEV1511 make tables InnoDB
ALTER TABLE tl_lasurv11_answer ENGINE=InnoDB;
ALTER TABLE tl_lasurv11_attachment ENGINE=InnoDB;
ALTER TABLE tl_lasurv11_option ENGINE=InnoDB;
ALTER TABLE tl_lasurv11_question ENGINE=InnoDB;
ALTER TABLE tl_lasurv11_session ENGINE=InnoDB;
ALTER TABLE tl_lasurv11_survey ENGINE=InnoDB;
ALTER TABLE tl_lasurv11_user ENGINE=InnoDB;
alter table tl_lasurv11_answer add foreign key (user_uid) references tl_lasurv11_user (uid);
alter table tl_lasurv11_answer add foreign key (question_uid) references tl_lasurv11_question (uid);
alter table tl_lasurv11_attachment add foreign key (survey_uid) references tl_lasurv11_survey (uid);
alter table tl_lasurv11_option add foreign key (question_uid) references tl_lasurv11_question (uid);
alter table tl_lasurv11_question add foreign key (survey_uid) references tl_lasurv11_survey (uid);
alter table tl_lasurv11_question add foreign key (create_by) references tl_lasurv11_user (uid);
alter table tl_lasurv11_session add foreign key (survey_uid) references tl_lasurv11_survey (uid);
alter table tl_lasurv11_survey add foreign key (create_by) references tl_lasurv11_user (uid);
alter table tl_lasurv11_user add foreign key (session_uid) references tl_lasurv11_session (uid);
alter table tl_lasurv11_user add foreign key (survey_uid) references tl_lasurv11_survey (uid);
UPDATE lams_tool SET modified_date_time = NOW() WHERE tool_signature = "lasurv11";
UPDATE lams_tool SET tool_version = "20080229" WHERE tool_signature = "lasurv11";
