Index: lams_tool_wiki/db/sql/table-schema.sql =================================================================== diff -u -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 -r17690c3ef82e9cba26cc0cd656b40d212871ba07 --- lams_tool_wiki/db/sql/table-schema.sql (.../table-schema.sql) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) +++ lams_tool_wiki/db/sql/table-schema.sql (.../table-schema.sql) (revision 17690c3ef82e9cba26cc0cd656b40d212871ba07) @@ -6,6 +6,7 @@ alter table tl_lawiki10_wiki_page drop foreign key FK961AFFEAD8004954; alter table tl_lawiki10_wiki_page drop foreign key FK961AFFEA60B3B03B; alter table tl_lawiki10_wiki_page drop foreign key FK961AFFEAE48332B4; +alter table tl_lawiki10_wiki_page drop foreign key FK961AFFEA3233D952; alter table tl_lawiki10_wiki_page_content drop foreign key FK528051242D44CCF8; alter table tl_lawiki10_wiki_page_content drop foreign key FK528051243233D952; drop table if exists tl_lawiki10_attachment; @@ -14,3 +15,20 @@ drop table if exists tl_lawiki10_wiki; drop table if exists tl_lawiki10_wiki_page; drop table if exists tl_lawiki10_wiki_page_content; +create table tl_lawiki10_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, wiki_uid bigint, primary key (uid)); +create table tl_lawiki10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), wiki_uid bigint, wiki_main_page_uid bigint, primary key (uid)); +create table tl_lawiki10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, wiki_session_uid bigint, entry_uid bigint, wiki_edits integer, primary key (uid)); +create table tl_lawiki10_wiki (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), instructions text, run_offline bit, lock_on_finished bit, allow_learner_create_pages bit, allow_learner_insert_links bit, allow_learner_attach_images bit, reflect_on_activity bit, reflect_instructions text, minimum_edits integer, maximum_edits integer, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, tool_content_id bigint, wiki_main_page_uid bigint, primary key (uid)); +create table tl_lawiki10_wiki_page (uid bigint not null auto_increment, wiki_uid bigint, title varchar(255), editable bit, wiki_current_content bigint, editor bigint, wiki_session_uid bigint, primary key (uid)); +create table tl_lawiki10_wiki_page_content (uid bigint not null auto_increment, wiki_page_uid bigint, body text, editor bigint, edit_date datetime, version bigint, primary key (uid)); +alter table tl_lawiki10_attachment add index FK9406D87760B3B03B (wiki_uid), add constraint FK9406D87760B3B03B foreign key (wiki_uid) references tl_lawiki10_wiki (uid); +alter table tl_lawiki10_session add index FKF01D63C260B3B03B (wiki_uid), add constraint FKF01D63C260B3B03B foreign key (wiki_uid) references tl_lawiki10_wiki (uid); +alter table tl_lawiki10_session add index FKF01D63C2A3FF7EC0 (wiki_main_page_uid), add constraint FKF01D63C2A3FF7EC0 foreign key (wiki_main_page_uid) references tl_lawiki10_wiki_page (uid); +alter table tl_lawiki10_user add index FKED5D7A1FD8004954 (wiki_session_uid), add constraint FKED5D7A1FD8004954 foreign key (wiki_session_uid) references tl_lawiki10_session (uid); +alter table tl_lawiki10_wiki add index FKED5E3E04A3FF7EC0 (wiki_main_page_uid), add constraint FKED5E3E04A3FF7EC0 foreign key (wiki_main_page_uid) references tl_lawiki10_wiki_page (uid); +alter table tl_lawiki10_wiki_page add index FK961AFFEAD8004954 (wiki_session_uid), add constraint FK961AFFEAD8004954 foreign key (wiki_session_uid) references tl_lawiki10_session (uid); +alter table tl_lawiki10_wiki_page add index FK961AFFEA60B3B03B (wiki_uid), add constraint FK961AFFEA60B3B03B foreign key (wiki_uid) references tl_lawiki10_wiki (uid); +alter table tl_lawiki10_wiki_page add index FK961AFFEAE48332B4 (wiki_current_content), add constraint FK961AFFEAE48332B4 foreign key (wiki_current_content) references tl_lawiki10_wiki_page_content (uid); +alter table tl_lawiki10_wiki_page add index FK961AFFEA3233D952 (editor), add constraint FK961AFFEA3233D952 foreign key (editor) references tl_lawiki10_user (uid); +alter table tl_lawiki10_wiki_page_content add index FK528051242D44CCF8 (wiki_page_uid), add constraint FK528051242D44CCF8 foreign key (wiki_page_uid) references tl_lawiki10_wiki_page (uid); +alter table tl_lawiki10_wiki_page_content add index FK528051243233D952 (editor), add constraint FK528051243233D952 foreign key (editor) references tl_lawiki10_user (uid);