Index: lams_tool_images/db/sql/table-schema.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_images/db/sql/table-schema.sql,v diff -u -r1.13 -r1.14 --- lams_tool_images/db/sql/table-schema.sql 19 Aug 2009 10:39:07 -0000 1.13 +++ lams_tool_images/db/sql/table-schema.sql 30 Jul 2012 18:51:47 -0000 1.14 @@ -1,50 +1,50 @@ -alter table tl_laimag10_attachment drop foreign key FK_NEW_1821149711_1E7009430E79035; -alter table tl_laimag10_item_log drop foreign key FK_NEW_1821149711_63195BC938BF8DFE; -alter table tl_laimag10_item_log drop foreign key FK_NEW_1821149711_63195BC941F9365D; -alter table tl_laimag10_imageGallery drop foreign key FK_NEW_1821149711_89093BF758092FB; -alter table tl_laimag10_imageGallery_item drop foreign key FK_NEW_1821149711_F52D1F9330E79035; -alter table tl_laimag10_imageGallery_item drop foreign key FK_NEW_1821149711_F52D1F93758092FB; -alter table tl_laimag10_image_comment drop foreign key FK_tl_laimag10_image_comment_2; -alter table tl_laimag10_image_comment drop foreign key FK_tl_laimag10_image_comment_3; -alter table tl_laimag10_image_rating drop foreign key FK_tl_laimag10_image_rating_2; -alter table tl_laimag10_image_rating drop foreign key FK_tl_laimag10_image_rating_3; -alter table tl_laimag10_image_vote drop foreign key FK_tl_laimag10_image_vote_2; -alter table tl_laimag10_image_vote drop foreign key FK_tl_laimag10_image_vote_3; -alter table tl_laimag10_session drop foreign key FK_NEW_1821149711_24AA78C530E79035; -alter table tl_laimag10_user drop foreign key FK_NEW_1821149711_30113BFC30E79035; -alter table tl_laimag10_user drop foreign key FK_NEW_1821149711_30113BFCEC0D3147; +alter table tl_laimag10_attachment drop foreign key FK6AB6721D2B86FA42; +alter table tl_laimag10_imageGallery drop foreign key FK451FBF1B98EE9FF; +alter table tl_laimag10_imageGallery_item drop foreign key FKF75F06A1B98EE9FF; +alter table tl_laimag10_imageGallery_item drop foreign key FKF75F06A12B86FA42; +alter table tl_laimag10_image_comment drop foreign key FKB20640417B33199; +alter table tl_laimag10_image_comment drop foreign key FKB2064041B98EE9FF; +alter table tl_laimag10_image_rating drop foreign key FK16529B7B7B33199; +alter table tl_laimag10_image_rating drop foreign key FK16529B7BB98EE9FF; +alter table tl_laimag10_image_vote drop foreign key FK89C11C487B33199; +alter table tl_laimag10_image_vote drop foreign key FK89C11C48B98EE9FF; +alter table tl_laimag10_item_log drop foreign key FK42F99B927B33199; +alter table tl_laimag10_item_log drop foreign key FK42F99B9286078D61; +alter table tl_laimag10_session drop foreign key FKD94E9BDC2B86FA42; +alter table tl_laimag10_user drop foreign key FKFF92C845ACCD4BC3; +alter table tl_laimag10_user drop foreign key FKFF92C8452B86FA42; drop table if exists tl_laimag10_attachment; -drop table if exists tl_laimag10_item_log; +drop table if exists tl_laimag10_configuration; drop table if exists tl_laimag10_imageGallery; drop table if exists tl_laimag10_imageGallery_item; drop table if exists tl_laimag10_image_comment; drop table if exists tl_laimag10_image_rating; drop table if exists tl_laimag10_image_vote; +drop table if exists tl_laimag10_item_log; drop table if exists tl_laimag10_session; drop table if exists tl_laimag10_user; -drop table if exists tl_laimag10_configuration; -create table tl_laimag10_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, imageGallery_uid bigint, primary key (uid)); +create table tl_laimag10_attachment (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, imageGallery_uid bigint, primary key (attachment_uid)); +create table tl_laimag10_configuration (uid bigint not null auto_increment, config_key varchar(30) unique, config_value varchar(255), primary key (uid)); +create table tl_laimag10_imageGallery (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, next_image_title bigint, online_instructions longtext, offline_instructions longtext, content_in_use bit, define_later bit, content_id bigint unique, allow_comment_images bit, allow_share_images bit, allow_vote bit, reflect_instructions varchar(255), reflect_on_activity bit, allow_rank bit, image_submit_notify bit, primary key (uid)); +create table tl_laimag10_imageGallery_item (uid bigint not null auto_increment, title varchar(255), description longtext, sequence_id integer, create_by bigint, create_date datetime, create_by_author bit, is_hide bit, original_file_uuid bigint, original_image_width integer, original_image_height integer, medium_file_uuid bigint, medium_image_width integer, medium_image_height integer, thumbnail_file_uuid bigint, file_version_id bigint, file_type varchar(255), file_name varchar(255), imageGallery_uid bigint, primary key (uid)); +create table tl_laimag10_image_comment (uid bigint not null auto_increment, create_date datetime, create_by bigint, comment longtext, imageGallery_item_uid bigint, primary key (uid)); +create table tl_laimag10_image_rating (uid bigint not null auto_increment, create_by bigint, rating integer, imageGallery_item_uid bigint, primary key (uid)); +create table tl_laimag10_image_vote (uid bigint not null auto_increment, create_by bigint, is_voted bit, imageGallery_item_uid bigint, primary key (uid)); create table tl_laimag10_item_log (uid bigint not null auto_increment, access_date datetime, imageGallery_item_uid bigint, user_uid bigint, complete bit, session_id bigint, primary key (uid)); -create table tl_laimag10_imageGallery (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, next_image_title bigint, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, content_id bigint unique, allow_comment_images bit, allow_share_images bit, allow_vote bit, reflect_instructions varchar(255), reflect_on_activity bit,allow_rank tinyint DEFAULT 0, image_submit_notify tinyint DEFAULT 0, primary key (uid)); -create table tl_laimag10_imageGallery_item (uid bigint not null auto_increment, description text, title varchar(255), create_by bigint, create_date datetime, create_by_author bit, sequence_id integer, is_hide bit, imageGallery_uid bigint, original_file_uuid bigint, original_image_width integer, original_image_height integer, medium_file_uuid bigint, medium_image_width integer, medium_image_height integer, thumbnail_file_uuid bigint, file_version_id bigint, file_type varchar(255), file_name varchar(255), primary key (uid)); -create table tl_laimag10_image_comment (uid bigint not null auto_increment, comment text, imageGallery_item_uid bigint, create_by bigint, create_date datetime, primary key (uid)); -create table tl_laimag10_image_rating (uid bigint not null auto_increment, rating integer, imageGallery_item_uid bigint, create_by bigint, primary key (uid)); -create table tl_laimag10_image_vote (uid bigint not null auto_increment, is_voted bit, imageGallery_item_uid bigint, create_by bigint, primary key (uid)); create table tl_laimag10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, imageGallery_uid bigint, session_id bigint, session_name varchar(250), primary key (uid)); create table tl_laimag10_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, imageGallery_uid bigint, session_finished bit, primary key (uid)); -create table tl_laimag10_configuration (uid bigint not null auto_increment, config_key varchar(30) unique, config_value varchar(255), primary key (uid)); -alter table tl_laimag10_attachment add index FK_NEW_1821149711_1E7009430E79035 (imageGallery_uid), add constraint FK_NEW_1821149711_1E7009430E79035 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid); -alter table tl_laimag10_item_log add index FK_NEW_1821149711_63195BC938BF8DFE (imageGallery_item_uid), add constraint FK_NEW_1821149711_63195BC938BF8DFE foreign key (imageGallery_item_uid) references tl_laimag10_imageGallery_item (uid); -alter table tl_laimag10_item_log add index FK_NEW_1821149711_63195BC941F9365D (user_uid), add constraint FK_NEW_1821149711_63195BC941F9365D foreign key (user_uid) references tl_laimag10_user (uid); -alter table tl_laimag10_imageGallery add index FK_NEW_1821149711_89093BF758092FB (create_by), add constraint FK_NEW_1821149711_89093BF758092FB foreign key (create_by) references tl_laimag10_user (uid); -alter table tl_laimag10_imageGallery_item add index FK_NEW_1821149711_F52D1F9330E79035 (imageGallery_uid), add constraint FK_NEW_1821149711_F52D1F9330E79035 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid); -alter table tl_laimag10_imageGallery_item add index FK_NEW_1821149711_F52D1F93758092FB (create_by), add constraint FK_NEW_1821149711_F52D1F93758092FB foreign key (create_by) references tl_laimag10_user (uid); -alter table tl_laimag10_image_comment add index FK_tl_laimag10_image_comment_3 (imageGallery_item_uid), add constraint FK_tl_laimag10_image_comment_3 foreign key (imageGallery_item_uid) references tl_laimag10_imageGallery_item (uid); -alter table tl_laimag10_image_comment add index FK_tl_laimag10_image_comment_2 (create_by), add constraint FK_tl_laimag10_image_comment_2 foreign key (create_by) references tl_laimag10_user (uid); -alter table tl_laimag10_image_rating add index FK_tl_laimag10_image_rating_3 (imageGallery_item_uid), add constraint FK_tl_laimag10_image_rating_3 foreign key (imageGallery_item_uid) references tl_laimag10_imageGallery_item (uid); -alter table tl_laimag10_image_rating add index FK_tl_laimag10_image_rating_2 (create_by), add constraint FK_tl_laimag10_image_rating_2 foreign key (create_by) references tl_laimag10_user (uid); -alter table tl_laimag10_image_vote add index FK_tl_laimag10_image_vote_3 (imageGallery_item_uid), add constraint FK_tl_laimag10_image_vote_3 foreign key (imageGallery_item_uid) references tl_laimag10_imageGallery_item (uid); -alter table tl_laimag10_image_vote add index FK_tl_laimag10_image_vote_2 (create_by), add constraint FK_tl_laimag10_image_vote_2 foreign key (create_by) references tl_laimag10_user (uid); -alter table tl_laimag10_session add index FK_NEW_1821149711_24AA78C530E79035 (imageGallery_uid), add constraint FK_NEW_1821149711_24AA78C530E79035 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid); -alter table tl_laimag10_user add index FK_NEW_1821149711_30113BFC30E79035 (imageGallery_uid), add constraint FK_NEW_1821149711_30113BFC30E79035 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid); -alter table tl_laimag10_user add index FK_NEW_1821149711_30113BFCEC0D3147 (session_uid), add constraint FK_NEW_1821149711_30113BFCEC0D3147 foreign key (session_uid) references tl_laimag10_session (uid); +alter table tl_laimag10_attachment add index FK6AB6721D2B86FA42 (imageGallery_uid), add constraint FK6AB6721D2B86FA42 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid); +alter table tl_laimag10_imageGallery add index FK451FBF1B98EE9FF (create_by), add constraint FK451FBF1B98EE9FF foreign key (create_by) references tl_laimag10_user (uid); +alter table tl_laimag10_imageGallery_item add index FKF75F06A1B98EE9FF (create_by), add constraint FKF75F06A1B98EE9FF foreign key (create_by) references tl_laimag10_user (uid); +alter table tl_laimag10_imageGallery_item add index FKF75F06A12B86FA42 (imageGallery_uid), add constraint FKF75F06A12B86FA42 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid); +alter table tl_laimag10_image_comment add index FKB20640417B33199 (imageGallery_item_uid), add constraint FKB20640417B33199 foreign key (imageGallery_item_uid) references tl_laimag10_imageGallery_item (uid); +alter table tl_laimag10_image_comment add index FKB2064041B98EE9FF (create_by), add constraint FKB2064041B98EE9FF foreign key (create_by) references tl_laimag10_user (uid); +alter table tl_laimag10_image_rating add index FK16529B7B7B33199 (imageGallery_item_uid), add constraint FK16529B7B7B33199 foreign key (imageGallery_item_uid) references tl_laimag10_imageGallery_item (uid); +alter table tl_laimag10_image_rating add index FK16529B7BB98EE9FF (create_by), add constraint FK16529B7BB98EE9FF foreign key (create_by) references tl_laimag10_user (uid); +alter table tl_laimag10_image_vote add index FK89C11C487B33199 (imageGallery_item_uid), add constraint FK89C11C487B33199 foreign key (imageGallery_item_uid) references tl_laimag10_imageGallery_item (uid); +alter table tl_laimag10_image_vote add index FK89C11C48B98EE9FF (create_by), add constraint FK89C11C48B98EE9FF foreign key (create_by) references tl_laimag10_user (uid); +alter table tl_laimag10_item_log add index FK42F99B927B33199 (imageGallery_item_uid), add constraint FK42F99B927B33199 foreign key (imageGallery_item_uid) references tl_laimag10_imageGallery_item (uid); +alter table tl_laimag10_item_log add index FK42F99B9286078D61 (user_uid), add constraint FK42F99B9286078D61 foreign key (user_uid) references tl_laimag10_user (uid); +alter table tl_laimag10_session add index FKD94E9BDC2B86FA42 (imageGallery_uid), add constraint FKD94E9BDC2B86FA42 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid); +alter table tl_laimag10_user add index FKFF92C845ACCD4BC3 (session_uid), add constraint FKFF92C845ACCD4BC3 foreign key (session_uid) references tl_laimag10_session (uid); +alter table tl_laimag10_user add index FKFF92C8452B86FA42 (imageGallery_uid), add constraint FKFF92C8452B86FA42 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid);