alter table tl_lascrb11_attachment drop foreign key FK57953706B3FA1495; alter table tl_lascrb11_heading drop foreign key FK428A22FFB3FA1495; alter table tl_lascrb11_report_entry drop foreign key FK5439FACA1C266FAE; alter table tl_lascrb11_report_entry drop foreign key FK5439FACAEA50D086; alter table tl_lascrb11_session drop foreign key FK89732793E46919FF; alter table tl_lascrb11_session drop foreign key FK89732793B3FA1495; alter table tl_lascrb11_user drop foreign key FK187DAFEE1C266FAE; drop table if exists tl_lascrb11_attachment; drop table if exists tl_lascrb11_heading; drop table if exists tl_lascrb11_report_entry; drop table if exists tl_lascrb11_scribe; drop table if exists tl_lascrb11_session; drop table if exists tl_lascrb11_user; create table tl_lascrb11_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, scribe_uid bigint, primary key (uid)); create table tl_lascrb11_heading (uid bigint not null auto_increment, heading longtext, scribe_uid bigint, display_order integer, primary key (uid)); create table tl_lascrb11_report_entry (uid bigint not null auto_increment, entry_text longtext, scribe_heading_uid bigint, scribe_session_uid bigint, primary key (uid)); create table tl_lascrb11_scribe (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), instructions longtext, run_offline bit, lock_on_finished bit, auto_select_scribe bit, reflect_on_activity bit, reflect_instructions longtext, online_instructions longtext, offline_instructions longtext, content_in_use bit, define_later bit, tool_content_id bigint, aggregated_reports bit, primary key (uid)); create table tl_lascrb11_session (uid bigint not null auto_increment, version integer not null, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), scribe_uid bigint, appointed_scribe_uid bigint, force_complete bit, report_submitted bit, primary key (uid)); create table tl_lascrb11_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, scribe_session_uid bigint, report_approved bit, started_activity bit, primary key (uid)); alter table tl_lascrb11_attachment add index FK57953706B3FA1495 (scribe_uid), add constraint FK57953706B3FA1495 foreign key (scribe_uid) references tl_lascrb11_scribe (uid); alter table tl_lascrb11_heading add index FK428A22FFB3FA1495 (scribe_uid), add constraint FK428A22FFB3FA1495 foreign key (scribe_uid) references tl_lascrb11_scribe (uid); alter table tl_lascrb11_report_entry add index FK5439FACA1C266FAE (scribe_session_uid), add constraint FK5439FACA1C266FAE foreign key (scribe_session_uid) references tl_lascrb11_session (uid); alter table tl_lascrb11_report_entry add index FK5439FACAEA50D086 (scribe_heading_uid), add constraint FK5439FACAEA50D086 foreign key (scribe_heading_uid) references tl_lascrb11_heading (uid); alter table tl_lascrb11_session add index FK89732793E46919FF (appointed_scribe_uid), add constraint FK89732793E46919FF foreign key (appointed_scribe_uid) references tl_lascrb11_user (uid); alter table tl_lascrb11_session add index FK89732793B3FA1495 (scribe_uid), add constraint FK89732793B3FA1495 foreign key (scribe_uid) references tl_lascrb11_scribe (uid); alter table tl_lascrb11_user add index FK187DAFEE1C266FAE (scribe_session_uid), add constraint FK187DAFEE1C266FAE foreign key (scribe_session_uid) references tl_lascrb11_session (uid);