alter table tl_lalead11_session drop foreign key FK_NEW_1316293302_B7C198E2FC940906;
alter table tl_lalead11_user drop foreign key FK_NEW_1316293302_CB8A58FFA3B0FADF;
drop table if exists lams_branch_condition;
drop table if exists lams_text_search_condition;
drop table if exists tl_lalead11_leaderselection;
drop table if exists tl_lalead11_session;
drop table if exists tl_lalead11_user;
create table lams_branch_condition (condition_id bigint not null auto_increment, condition_ui_id integer, order_id integer, name varchar(255), display_name varchar(255), type varchar(255), start_value varchar(255), end_value varchar(255), exact_match_value varchar(255), primary key (condition_id));
create table lams_text_search_condition (condition_id bigint not null, text_search_all_words varchar(255), text_search_phrase varchar(255), text_search_any_words varchar(255), text_search_excluded_words varchar(255), primary key (condition_id));
create table tl_lalead11_leaderselection (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, allow_rich_editor bit, online_instructions longtext, offline_instructions longtext, content_in_use bit, define_later bit, submission_deadline datetime, tool_content_id bigint, primary key (uid));
create table tl_lalead11_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), leaderselection_uid bigint, primary key (uid));
create table tl_lalead11_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, leaderselection_session_uid bigint, entry_uid bigint, primary key (uid));
alter table lams_text_search_condition add index FK_NEW_1316293302_69B884B21E70F543 (condition_id), add constraint FK_NEW_1316293302_69B884B21E70F543 foreign key (condition_id) references lams_branch_condition (condition_id);
alter table tl_lalead11_session add index FK_NEW_1316293302_B7C198E2FC940906 (leaderselection_uid), add constraint FK_NEW_1316293302_B7C198E2FC940906 foreign key (leaderselection_uid) references tl_lalead11_leaderselection (uid);
alter table tl_lalead11_user add index FK_NEW_1316293302_CB8A58FFA3B0FADF (leaderselection_session_uid), add constraint FK_NEW_1316293302_CB8A58FFA3B0FADF foreign key (leaderselection_session_uid) references tl_lalead11_session (uid);
