alter table tl_labbb10_attachment drop foreign key fk_labbb10_bbb_attachment_to_bbb; alter table tl_labbb10_session drop foreign key fk_labbb10_bbb_session_to_bbb; alter table tl_labbb10_user drop foreign key fk_labbb10_bbb_user_to_bbb_session; drop table if exists tl_labbb10_attachment; drop table if exists tl_labbb10_bbb; drop table if exists tl_labbb10_config; drop table if exists tl_labbb10_session; drop table if exists tl_labbb10_user; create table tl_labbb10_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, bbb_uid bigint, primary key (uid)); create table tl_labbb10_bbb (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, reflect_on_activity bit, reflect_instructions longtext, online_instructions longtext, offline_instructions longtext, content_in_use bit, define_later bit, tool_content_id bigint, primary key (uid)); create table tl_labbb10_config (uid bigint not null auto_increment, config_key varchar(255), config_value varchar(255), primary key (uid)); create table tl_labbb10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), bbb_uid bigint, meeting_created bit, attendee_password varchar(255), moderator_password varchar(255), primary key (uid)); create table tl_labbb10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, bbb_session_uid bigint, notebook_entry_uid bigint, primary key (uid)); alter table tl_labbb10_attachment add index fk_labbb10_bbb_attachment_to_bbb (bbb_uid), add constraint fk_labbb10_bbb_attachment_to_bbb foreign key (bbb_uid) references tl_labbb10_bbb (uid); alter table tl_labbb10_session add index fk_labbb10_bbb_session_to_bbb (bbb_uid), add constraint fk_labbb10_bbb_session_to_bbb foreign key (bbb_uid) references tl_labbb10_bbb (uid); alter table tl_labbb10_user add index fk_labbb10_bbb_user_to_bbb_session (bbb_session_uid), add constraint fk_labbb10_bbb_user_to_bbb_session foreign key (bbb_session_uid) references tl_labbb10_session (uid);