alter table tl_laimsc11_attachment drop foreign key FK3C5E6992119AAE45;
alter table tl_laimsc11_commonCartridge drop foreign key FKB141FAD11B70119;
alter table tl_laimsc11_commonCartridge_item drop foreign key FKF4FB53C1119AAE45;
alter table tl_laimsc11_commonCartridge_item drop foreign key FKF4FB53C19E25A669;
alter table tl_laimsc11_commonCartridge_item drop foreign key FKF4FB53C11B70119;
alter table tl_laimsc11_item_instruction drop foreign key FKEF1E8291243BDF0B;
alter table tl_laimsc11_item_log drop foreign key FKDDB2EC47AE3BD26A;
alter table tl_laimsc11_item_log drop foreign key FKDDB2EC47CE2FA47B;
alter table tl_laimsc11_session drop foreign key FKA47DE087119AAE45;
alter table tl_laimsc11_user drop foreign key FKCE92BB7A119AAE45;
alter table tl_laimsc11_user drop foreign key FKCE92BB7A9E25A669;
drop table if exists tl_laimsc11_attachment;
drop table if exists tl_laimsc11_commonCartridge;
drop table if exists tl_laimsc11_commonCartridge_item;
drop table if exists tl_laimsc11_configuration;
drop table if exists tl_laimsc11_item_instruction;
drop table if exists tl_laimsc11_item_log;
drop table if exists tl_laimsc11_session;
drop table if exists tl_laimsc11_user;
create table tl_laimsc11_attachment (uid bigint not null auto_increment, file_version_id bigint, file_type varchar(255), file_name varchar(255), file_uuid bigint, create_date datetime, commonCartridge_uid bigint, primary key (uid));
create table tl_laimsc11_commonCartridge (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), run_offline bit, lock_on_finished bit, instructions longtext, online_instructions longtext, offline_instructions longtext, content_in_use bit, define_later bit, content_id bigint unique, mini_view_commonCartridge_number integer, allow_auto_run bit, reflect_instructions varchar(255), reflect_on_activity bit, primary key (uid));
create table tl_laimsc11_commonCartridge_item (uid bigint not null auto_increment, file_uuid bigint, file_version_id bigint, description varchar(255), ims_schema varchar(255), init_item varchar(255), organization_xml longtext, title varchar(255), url longtext, create_by bigint, create_date datetime, create_by_author bit, is_hide bit, item_type smallint, file_type varchar(255), file_name varchar(255), open_url_new_window bit, launch_url varchar(255), secure_launch_url varchar(255), tool_key varchar(255), tool_secret varchar(255), custom_str longtext, button_text varchar(255), frame_height integer, commonCartridge_uid bigint, session_uid bigint, primary key (uid));
create table tl_laimsc11_configuration (uid bigint not null auto_increment, config_key varchar(30) unique, config_value varchar(255), primary key (uid));
create table tl_laimsc11_item_instruction (uid bigint not null auto_increment, description varchar(255), sequence_id integer, item_uid bigint, primary key (uid));
create table tl_laimsc11_item_log (uid bigint not null auto_increment, access_date datetime, commonCartridge_item_uid bigint, user_uid bigint, complete bit, session_id bigint, primary key (uid));
create table tl_laimsc11_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, commonCartridge_uid bigint, session_id bigint, session_name varchar(250), primary key (uid));
create table tl_laimsc11_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), first_name varchar(255), login_name varchar(255), session_uid bigint, commonCartridge_uid bigint, session_finished bit, primary key (uid));
alter table tl_laimsc11_attachment add index FK3C5E6992119AAE45 (commonCartridge_uid), add constraint FK3C5E6992119AAE45 foreign key (commonCartridge_uid) references tl_laimsc11_commonCartridge (uid);
alter table tl_laimsc11_commonCartridge add index FKB141FAD11B70119 (create_by), add constraint FKB141FAD11B70119 foreign key (create_by) references tl_laimsc11_user (uid);
alter table tl_laimsc11_commonCartridge_item add index FKF4FB53C1119AAE45 (commonCartridge_uid), add constraint FKF4FB53C1119AAE45 foreign key (commonCartridge_uid) references tl_laimsc11_commonCartridge (uid);
alter table tl_laimsc11_commonCartridge_item add index FKF4FB53C19E25A669 (session_uid), add constraint FKF4FB53C19E25A669 foreign key (session_uid) references tl_laimsc11_session (uid);
alter table tl_laimsc11_commonCartridge_item add index FKF4FB53C11B70119 (create_by), add constraint FKF4FB53C11B70119 foreign key (create_by) references tl_laimsc11_user (uid);
alter table tl_laimsc11_item_instruction add index FKEF1E8291243BDF0B (item_uid), add constraint FKEF1E8291243BDF0B foreign key (item_uid) references tl_laimsc11_commonCartridge_item (uid);
alter table tl_laimsc11_item_log add index FKDDB2EC47AE3BD26A (commonCartridge_item_uid), add constraint FKDDB2EC47AE3BD26A foreign key (commonCartridge_item_uid) references tl_laimsc11_commonCartridge_item (uid);
alter table tl_laimsc11_item_log add index FKDDB2EC47CE2FA47B (user_uid), add constraint FKDDB2EC47CE2FA47B foreign key (user_uid) references tl_laimsc11_user (uid);
alter table tl_laimsc11_session add index FKA47DE087119AAE45 (commonCartridge_uid), add constraint FKA47DE087119AAE45 foreign key (commonCartridge_uid) references tl_laimsc11_commonCartridge (uid);
alter table tl_laimsc11_user add index FKCE92BB7A119AAE45 (commonCartridge_uid), add constraint FKCE92BB7A119AAE45 foreign key (commonCartridge_uid) references tl_laimsc11_commonCartridge (uid);
alter table tl_laimsc11_user add index FKCE92BB7A9E25A669 (session_uid), add constraint FKCE92BB7A9E25A669 foreign key (session_uid) references tl_laimsc11_session (uid);
