alter table tl_laimsc11_attachment drop foreign key FK_NEW_1279208528_1E7009430E79035;
alter table tl_laimsc11_item_instruction drop foreign key FK_NEW_1279208528_A5665013980570ED;
alter table tl_laimsc11_item_log drop foreign key FK_NEW_1279208528_63195BC938BF8DFE;
alter table tl_laimsc11_item_log drop foreign key FK_NEW_1279208528_63195BC941F9365D;
alter table tl_laimsc11_commonCartridge drop foreign key FK_NEW_1279208528_89093BF758092FB;
alter table tl_laimsc11_commonCartridge_item drop foreign key FK_NEW_1279208528_F52D1F9330E79035;
alter table tl_laimsc11_commonCartridge_item drop foreign key FK_NEW_1279208528_F52D1F93EC0D3147;
alter table tl_laimsc11_commonCartridge_item drop foreign key FK_NEW_1279208528_F52D1F93758092FB;
alter table tl_laimsc11_session drop foreign key FK_NEW_1279208528_24AA78C530E79035;
alter table tl_laimsc11_user drop foreign key FK_NEW_1279208528_30113BFC30E79035;
alter table tl_laimsc11_user drop foreign key FK_NEW_1279208528_30113BFCEC0D3147;
drop table if exists tl_laimsc11_attachment;
drop table if exists tl_laimsc11_item_instruction;
drop table if exists tl_laimsc11_item_log;
drop table if exists tl_laimsc11_commonCartridge;
drop table if exists tl_laimsc11_commonCartridge_item;
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_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_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 text, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, content_id bigint unique, allow_add_files bit, allow_add_urls bit, mini_view_commonCartridge_number integer, allow_auto_run bit, reflect_instructions varchar(255), reflect_on_activity bit,assigment_submit_notify tinyint DEFAULT 0, 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 text, title varchar(255), url text, 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, commonCartridge_uid bigint, session_uid 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 FK_NEW_1279208528_1E7009430E79035 (commonCartridge_uid), add constraint FK_NEW_1279208528_1E7009430E79035 foreign key (commonCartridge_uid) references tl_laimsc11_commonCartridge (uid);
alter table tl_laimsc11_item_instruction add index FK_NEW_1279208528_A5665013980570ED (item_uid), add constraint FK_NEW_1279208528_A5665013980570ED foreign key (item_uid) references tl_laimsc11_commonCartridge_item (uid);
alter table tl_laimsc11_item_log add index FK_NEW_1279208528_63195BC938BF8DFE (commonCartridge_item_uid), add constraint FK_NEW_1279208528_63195BC938BF8DFE foreign key (commonCartridge_item_uid) references tl_laimsc11_commonCartridge_item (uid);
alter table tl_laimsc11_item_log add index FK_NEW_1279208528_63195BC941F9365D (user_uid), add constraint FK_NEW_1279208528_63195BC941F9365D foreign key (user_uid) references tl_laimsc11_user (uid);
alter table tl_laimsc11_commonCartridge add index FK_NEW_1279208528_89093BF758092FB (create_by), add constraint FK_NEW_1279208528_89093BF758092FB foreign key (create_by) references tl_laimsc11_user (uid);
alter table tl_laimsc11_commonCartridge_item add index FK_NEW_1279208528_F52D1F9330E79035 (commonCartridge_uid), add constraint FK_NEW_1279208528_F52D1F9330E79035 foreign key (commonCartridge_uid) references tl_laimsc11_commonCartridge (uid);
alter table tl_laimsc11_commonCartridge_item add index FK_NEW_1279208528_F52D1F93EC0D3147 (session_uid), add constraint FK_NEW_1279208528_F52D1F93EC0D3147 foreign key (session_uid) references tl_laimsc11_session (uid);
alter table tl_laimsc11_commonCartridge_item add index FK_NEW_1279208528_F52D1F93758092FB (create_by), add constraint FK_NEW_1279208528_F52D1F93758092FB foreign key (create_by) references tl_laimsc11_user (uid);
alter table tl_laimsc11_session add index FK_NEW_1279208528_24AA78C530E79035 (commonCartridge_uid), add constraint FK_NEW_1279208528_24AA78C530E79035 foreign key (commonCartridge_uid) references tl_laimsc11_commonCartridge (uid);
alter table tl_laimsc11_user add index FK_NEW_1279208528_30113BFC30E79035 (commonCartridge_uid), add constraint FK_NEW_1279208528_30113BFC30E79035 foreign key (commonCartridge_uid) references tl_laimsc11_commonCartridge (uid);
alter table tl_laimsc11_user add index FK_NEW_1279208528_30113BFCEC0D3147 (session_uid), add constraint FK_NEW_1279208528_30113BFCEC0D3147 foreign key (session_uid) references tl_laimsc11_session (uid);
