alter table tl_lamc11_options_content drop foreign key FK1CD3DE6B57A3BE34;
alter table tl_lamc11_que_content drop foreign key FK68EC7D0E1FF4F2CF;
alter table tl_lamc11_que_usr drop foreign key FK69F4A0A9B0D761AF;
alter table tl_lamc11_session drop foreign key FKB941C0291FF4F2CF;
alter table tl_lamc11_uploadedfile drop foreign key FKB757AA291FF4F2CF;
alter table tl_lamc11_usr_attempt drop foreign key FKFA6FA7357884F30B;
alter table tl_lamc11_usr_attempt drop foreign key FKFA6FA735A2D809E3;
alter table tl_lamc11_usr_attempt drop foreign key FKFA6FA73557A3BE34;
drop table if exists tl_lamc11_content;
drop table if exists tl_lamc11_options_content;
drop table if exists tl_lamc11_que_content;
drop table if exists tl_lamc11_que_usr;
drop table if exists tl_lamc11_session;
drop table if exists tl_lamc11_uploadedfile;
drop table if exists tl_lamc11_usr_attempt;
create table tl_lamc11_content (uid bigint not null auto_increment, content_id bigint not null, title longtext, instructions longtext, reflectionSubject longtext, define_later bit, run_offline bit, creation_date datetime, update_date datetime, submission_deadline datetime, questions_sequenced bit, reflect bit, created_by bigint, content_in_use bit, offline_instructions longtext, online_instructions longtext, retries bit, show_report bit, showMarks bit, randomize bit, displayAnswers bit, pass_mark integer, primary key (uid));
create table tl_lamc11_options_content (uid bigint not null auto_increment, correct_option bit not null, mc_que_option_text varchar(250), displayOrder integer, mc_que_content_id bigint not null, primary key (uid));
create table tl_lamc11_que_content (uid bigint not null auto_increment, question longtext, display_order integer, mark integer, feedback longtext, mc_content_id bigint not null, primary key (uid));
create table tl_lamc11_que_usr (uid bigint not null auto_increment, que_usr_id bigint not null, username varchar(255), fullname varchar(255), responseFinalised bit, viewSummaryRequested bit, mc_session_id bigint, last_attempt_order integer, last_attempt_total_mark integer, primary key (uid));
create table tl_lamc11_session (uid bigint not null auto_increment, mc_session_id bigint not null, session_start_date datetime, session_end_date datetime, session_status varchar(100), session_name varchar(100), mc_content_id bigint, primary key (uid));
create table tl_lamc11_uploadedfile (submissionId bigint not null auto_increment, uuid varchar(255), isOnline_File bit, filename varchar(255), mc_content_id bigint, primary key (submissionId));
create table tl_lamc11_usr_attempt (uid bigint not null auto_increment, attempt_time datetime, mark integer, finished bit, passed bit, isAttemptCorrect bit, attemptOrder integer, mc_que_content_id bigint not null, que_usr_id bigint not null, mc_que_option_id bigint, primary key (uid));
alter table tl_lamc11_options_content add index FK1CD3DE6B57A3BE34 (mc_que_content_id), add constraint FK1CD3DE6B57A3BE34 foreign key (mc_que_content_id) references tl_lamc11_que_content (uid);
alter table tl_lamc11_que_content add index FK68EC7D0E1FF4F2CF (mc_content_id), add constraint FK68EC7D0E1FF4F2CF foreign key (mc_content_id) references tl_lamc11_content (uid);
alter table tl_lamc11_que_usr add index FK69F4A0A9B0D761AF (mc_session_id), add constraint FK69F4A0A9B0D761AF foreign key (mc_session_id) references tl_lamc11_session (uid);
alter table tl_lamc11_session add index FKB941C0291FF4F2CF (mc_content_id), add constraint FKB941C0291FF4F2CF foreign key (mc_content_id) references tl_lamc11_content (uid);
alter table tl_lamc11_uploadedfile add index FKB757AA291FF4F2CF (mc_content_id), add constraint FKB757AA291FF4F2CF foreign key (mc_content_id) references tl_lamc11_content (uid);
alter table tl_lamc11_usr_attempt add index FKFA6FA7357884F30B (que_usr_id), add constraint FKFA6FA7357884F30B foreign key (que_usr_id) references tl_lamc11_que_usr (uid);
alter table tl_lamc11_usr_attempt add index FKFA6FA735A2D809E3 (mc_que_option_id), add constraint FKFA6FA735A2D809E3 foreign key (mc_que_option_id) references tl_lamc11_options_content (uid);
alter table tl_lamc11_usr_attempt add index FKFA6FA73557A3BE34 (mc_que_content_id), add constraint FKFA6FA73557A3BE34 foreign key (mc_que_content_id) references tl_lamc11_que_content (uid);
