Index: lams_tool_eadventure/db/sql/table-schema.sql
===================================================================
diff -u -r7322054ababd8f5387c3424cdd38d99c3ab49e02 -rd56929f06ad90a63082d514e6521adc175f3de27
--- lams_tool_eadventure/db/sql/table-schema.sql	(.../table-schema.sql)	(revision 7322054ababd8f5387c3424cdd38d99c3ab49e02)
+++ lams_tool_eadventure/db/sql/table-schema.sql	(.../table-schema.sql)	(revision d56929f06ad90a63082d514e6521adc175f3de27)
@@ -1,85 +1,44 @@
-alter table tl_eueadv10_attachment drop foreign key FK_NEW_1226715514_1E7009430E79035;
-alter table tl_eueadv10_item_instruction drop foreign key FK_NEW_1226715514_A5665013980570ED;
-alter table tl_eueadv10_item_log drop foreign key FK_NEW_1226715514_63195BC938BF8DFE;
-alter table tl_eueadv10_item_log drop foreign key FK_NEW_1226715514_63195BC941F9365D;
-alter table tl_eueadv10_eadventure drop foreign key FK_NEW_1226715514_89093BF758092FB;
-alter table tl_eueadv10_eadventure_item drop foreign key FK_NEW_1226715514_F52D1F9330E79035;
-alter table tl_eueadv10_eadventure_item drop foreign key FK_NEW_1226715514_F52D1F93EC0D3147;
-alter table tl_eueadv10_eadventure_item drop foreign key FK_NEW_1226715514_F52D1F93758092FB;
-alter table tl_eueadv10_session drop foreign key FK_NEW_1226715514_24AA78C530E79035;
-alter table tl_eueadv10_user drop foreign key FK_NEW_1226715514_30113BFC30E79035;
-alter table tl_eueadv10_user drop foreign key FK_NEW_1226715514_30113BFCEC0D3147;
-drop table if exists tl_eueadv10_attachment;
-drop table if exists tl_eueadv10_item_instruction;
-drop table if exists tl_eueadv10_item_log;
-drop table if exists tl_eueadv10_eadventure;
-drop table if exists tl_eueadv10_eadventure_item;
-drop table if exists tl_eueadv10_session;
-drop table if exists tl_eueadv10_user;
-create table tl_eueadv10_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,
-   eadventure_uid bigint,
-   primary key (uid)
-);
-create table tl_eueadv10_eadventure (
-   uid bigint not null auto_increment,
-   create_date datetime,
-   update_date datetime,
-   create_by bigint,
-   title varchar(255),
-   run_offline tinyint,
-   lock_on_finished tinyint,
-   instructions text,
-   online_instructions text,
-   offline_instructions text,
-   content_in_use tinyint,
-   define_later tinyint,
-   content_id bigint unique,
-   allow_add_files tinyint,
-   allow_add_urls tinyint,
-   mini_view_eadventure_number integer,
-   allow_auto_run tinyint,
-   reflect_instructions varchar(255), 
-   reflect_on_activity smallint,
-   assigment_submit_notify tinyint DEFAULT 0,
-   ims_schema varchar(255),
-   organization_xml text,
-   file_uuid bigint,
-   file_version_id bigint,
-   file_name varchar(255),
-   complete tinyint,
-   session_uid bigint,
-   primary key (uid)
-);
-create table tl_eueadv10_session (
-   uid bigint not null auto_increment,
-   session_end_date datetime,
-   session_start_date datetime,
-   status integer,
-   eadventure_uid bigint,
-   session_id bigint,
-   session_name varchar(250),
-   primary key (uid)
-);
-create table tl_eueadv10_user (
-   uid bigint not null auto_increment,
-   user_id bigint,
-   last_name varchar(255),
-   first_name varchar(255),
-   login_name varchar(255),
-   session_finished smallint,
-   session_uid bigint,
-   eadventure_uid bigint,
-   primary key (uid)
-);
-alter table tl_eueadv10_attachment add index FK_NEW_1226715514_1E7009430E79035 (eadventure_uid), add constraint FK_NEW_1226715514_1E7009430E79035 foreign key (eadventure_uid) references tl_eueadv10_eadventure (uid);
-alter table tl_eueadv10_eadventure add index FK_NEW_1226715514_89093BF758092FB (create_by), add constraint FK_NEW_1226715514_89093BF758092FB foreign key (create_by) references tl_eueadv10_user (uid);
-alter table tl_eueadv10_eadventure add index FK_NEW_1226715514_F52D1F93EC0D3147 (session_uid), add constraint FK_NEW_1226715514_F52D1F93EC0D3147 foreign key (session_uid) references tl_eueadv10_session (uid);
-alter table tl_eueadv10_session add index FK_NEW_1226715514_24AA78C530E79035 (eadventure_uid), add constraint FK_NEW_1226715514_24AA78C530E79035 foreign key (eadventure_uid) references tl_eueadv10_eadventure (uid);
-alter table tl_eueadv10_user add index FK_NEW_1226715514_30113BFCEC0D3147 (session_uid), add constraint FK_NEW_1226715514_30113BFCEC0D3147 foreign key (session_uid) references tl_eueadv10_session (uid);
-alter table tl_eueadv10_user add index FK_NEW_1226715514_30113BFC309ED320 (eadventure_uid), add constraint FK_NEW_1226715514_30113BFC309ED320 foreign key (eadventure_uid) references tl_eueadv10_eadventure (uid);
+alter table tl_eueadv10_attachment drop foreign key FK9A86A0DE7457B3C2;
+alter table tl_eueadv10_condition drop foreign key FK3884C2007457B3C2;
+alter table tl_eueadv10_condition_expression drop foreign key FK8227E637B9955581;
+alter table tl_eueadv10_condition_expression drop foreign key FK8227E6378DA4B497;
+alter table tl_eueadv10_condition_expression drop foreign key FK8227E637237D4E04;
+alter table tl_eueadv10_eadventure drop foreign key FK4729E006F7C0E0CB;
+alter table tl_eueadv10_item_log drop foreign key FKEED886936569AFFE;
+alter table tl_eueadv10_item_log drop foreign key FKEED88693C439842D;
+alter table tl_eueadv10_param drop foreign key FKDB03A7F27457B3C2;
+alter table tl_eueadv10_session drop foreign key FKCE55CCBB7457B3C2;
+alter table tl_eueadv10_user drop foreign key FK1FD95BC67457B3C2;
+alter table tl_eueadv10_user drop foreign key FK1FD95BC6652C5177;
+alter table tl_eueadv10_var drop foreign key FK74A3EBCCBAB77093;
+drop table if exists tl_eueadv10_attachment;
+drop table if exists tl_eueadv10_condition;
+drop table if exists tl_eueadv10_condition_expression;
+drop table if exists tl_eueadv10_eadventure;
+drop table if exists tl_eueadv10_item_log;
+drop table if exists tl_eueadv10_param;
+drop table if exists tl_eueadv10_session;
+drop table if exists tl_eueadv10_user;
+drop table if exists tl_eueadv10_var;
+create table tl_eueadv10_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, eadventure_uid bigint, primary key (uid));
+create table tl_eueadv10_condition (uid bigint not null auto_increment, name varchar(255), sequence_id integer, eadventure_uid bigint, primary key (uid));
+create table tl_eueadv10_condition_expression (uid bigint not null auto_increment, first_op bigint, value_introduced varchar(255), var_introduced bigint, expresion_op varchar(255), sequence_id integer, condition_uid bigint, next_op varchar(255), primary key (uid));
+create table tl_eueadv10_eadventure (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, reflect_instructions varchar(255), reflect_on_activity bit, ims_schema longtext, organization_xml longtext, file_name longtext, file_uuid bigint, file_version_id bigint, file_type varchar(255), define_complete bit, init_item varchar(255), primary key (uid));
+create table tl_eueadv10_item_log (uid bigint not null auto_increment, access_date datetime, eadventure_item_uid bigint, user_uid bigint, complete bit, session_id bigint, primary key (uid));
+create table tl_eueadv10_param (uid bigint not null auto_increment, name varchar(255), type varchar(255), input bit, eadventure_uid bigint, primary key (uid));
+create table tl_eueadv10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, eadventure_uid bigint, session_id bigint, session_name varchar(250), primary key (uid));
+create table tl_eueadv10_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, eadventure_uid bigint, session_finished bit, primary key (uid));
+create table tl_eueadv10_var (uid bigint not null auto_increment, name varchar(255), type varchar(255), value longtext, visit_log_uid bigint, primary key (uid));
+alter table tl_eueadv10_attachment add index FK9A86A0DE7457B3C2 (eadventure_uid), add constraint FK9A86A0DE7457B3C2 foreign key (eadventure_uid) references tl_eueadv10_eadventure (uid);
+alter table tl_eueadv10_condition add index FK3884C2007457B3C2 (eadventure_uid), add constraint FK3884C2007457B3C2 foreign key (eadventure_uid) references tl_eueadv10_eadventure (uid);
+alter table tl_eueadv10_condition_expression add index FK8227E637B9955581 (condition_uid), add constraint FK8227E637B9955581 foreign key (condition_uid) references tl_eueadv10_condition (uid);
+alter table tl_eueadv10_condition_expression add index FK8227E6378DA4B497 (first_op), add constraint FK8227E6378DA4B497 foreign key (first_op) references tl_eueadv10_param (uid);
+alter table tl_eueadv10_condition_expression add index FK8227E637237D4E04 (var_introduced), add constraint FK8227E637237D4E04 foreign key (var_introduced) references tl_eueadv10_param (uid);
+alter table tl_eueadv10_eadventure add index FK4729E006F7C0E0CB (create_by), add constraint FK4729E006F7C0E0CB foreign key (create_by) references tl_eueadv10_user (uid);
+alter table tl_eueadv10_item_log add index FKEED886936569AFFE (eadventure_item_uid), add constraint FKEED886936569AFFE foreign key (eadventure_item_uid) references tl_eueadv10_eadventure (uid);
+alter table tl_eueadv10_item_log add index FKEED88693C439842D (user_uid), add constraint FKEED88693C439842D foreign key (user_uid) references tl_eueadv10_user (uid);
+alter table tl_eueadv10_param add index FKDB03A7F27457B3C2 (eadventure_uid), add constraint FKDB03A7F27457B3C2 foreign key (eadventure_uid) references tl_eueadv10_eadventure (uid);
+alter table tl_eueadv10_session add index FKCE55CCBB7457B3C2 (eadventure_uid), add constraint FKCE55CCBB7457B3C2 foreign key (eadventure_uid) references tl_eueadv10_eadventure (uid);
+alter table tl_eueadv10_user add index FK1FD95BC67457B3C2 (eadventure_uid), add constraint FK1FD95BC67457B3C2 foreign key (eadventure_uid) references tl_eueadv10_eadventure (uid);
+alter table tl_eueadv10_user add index FK1FD95BC6652C5177 (session_uid), add constraint FK1FD95BC6652C5177 foreign key (session_uid) references tl_eueadv10_session (uid);
+alter table tl_eueadv10_var add index FK74A3EBCCBAB77093 (visit_log_uid), add constraint FK74A3EBCCBAB77093 foreign key (visit_log_uid) references tl_eueadv10_item_log (uid);
