Index: lams_tool_nb/db/model/lams_tool_nb.clay =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/db/model/lams_tool_nb.clay,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_nb/db/model/lams_tool_nb.clay 22 Jun 2005 06:34:47 -0000 1.1 @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
Index: lams_tool_nb/db/sql/create_lams_tool_nb.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/db/sql/create_lams_tool_nb.sql,v diff -u -r1.1 -r1.2 --- lams_tool_nb/db/sql/create_lams_tool_nb.sql 7 Jun 2005 05:52:19 -0000 1.1 +++ lams_tool_nb/db/sql/create_lams_tool_nb.sql 22 Jun 2005 06:34:47 -0000 1.2 @@ -1,5 +1,6 @@ CREATE TABLE lams.tl_lanb11_content ( - nb_content_id BIGINT(20) NOT NULL + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , nb_content_id BIGINT(20) UNIQUE NOT NULL , title VARCHAR(255) , content TEXT , online_instructions TEXT @@ -9,17 +10,19 @@ , creator_user_id BIGINT(20) , date_created DATETIME , date_updated DATETIME - , PRIMARY KEY (nb_content_id) + , PRIMARY KEY (uid) )TYPE=InnoDB; CREATE TABLE lams.tl_lanb11_session ( - nb_session_id BIGINT(20) NOT NULL - , nb_content_id BIGINT(20) NOT NULL + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , nb_session_id BIGINT(20) UNIQUE NOT NULL + , nb_content_uid BIGINT(20) NOT NULL , session_start_date DATETIME , session_end_date DATETIME , session_status VARCHAR(100) - , PRIMARY KEY (nb_session_id) - , INDEX (nb_content_id) - , CONSTRAINT FK_tl_lanb11_session_1 FOREIGN KEY (nb_content_id) - REFERENCES lams.tl_lanb11_content (nb_content_id) -)TYPE=InnoDB; \ No newline at end of file + , PRIMARY KEY (uid) + , INDEX (nb_content_uid) + , CONSTRAINT FK_tl_lanb11_session_1 FOREIGN KEY (nb_content_uid) + REFERENCES lams.tl_lanb11_content (uid) +)TYPE=InnoDB; + Index: lams_tool_nb/db/sql/init_lams_tool_nb.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/db/sql/Attic/init_lams_tool_nb.sql,v diff -u -r1.1 -r1.2 --- lams_tool_nb/db/sql/init_lams_tool_nb.sql 7 Jun 2005 05:52:19 -0000 1.1 +++ lams_tool_nb/db/sql/init_lams_tool_nb.sql 22 Jun 2005 06:34:47 -0000 1.2 @@ -6,7 +6,8 @@ -- Create a fresh copy of the noticeboard table CREATE TABLE lams.tl_lanb11_content ( - nb_content_id BIGINT(20) NOT NULL + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , nb_content_id BIGINT(20) UNIQUE NOT NULL , title VARCHAR(255) , content TEXT , online_instructions TEXT @@ -16,17 +17,19 @@ , creator_user_id BIGINT(20) , date_created DATETIME , date_updated DATETIME - , PRIMARY KEY (nb_content_id) + , PRIMARY KEY (uid) )TYPE=InnoDB; CREATE TABLE lams.tl_lanb11_session ( - nb_session_id BIGINT(20) NOT NULL - , nb_content_id BIGINT(20) NOT NULL + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , nb_session_id BIGINT(20) UNIQUE NOT NULL + , nb_content_uid BIGINT(20) NOT NULL , session_start_date DATETIME , session_end_date DATETIME , session_status VARCHAR(100) - , PRIMARY KEY (nb_session_id) - , INDEX (nb_content_id) - , CONSTRAINT FK_tl_lanb11_session_1 FOREIGN KEY (nb_content_id) - REFERENCES lams.tl_lanb11_content (nb_content_id) -)TYPE=InnoDB; \ No newline at end of file + , PRIMARY KEY (uid) + , INDEX (nb_content_uid) + , CONSTRAINT FK_tl_lanb11_session_1 FOREIGN KEY (nb_content_uid) + REFERENCES lams.tl_lanb11_content (uid) +)TYPE=InnoDB; + Index: lams_tool_nb/db/sql/insert_lams_tool_nb_data.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/db/sql/Attic/insert_lams_tool_nb_data.sql,v diff -u -r1.1 -r1.2 --- lams_tool_nb/db/sql/insert_lams_tool_nb_data.sql 7 Jun 2005 05:52:19 -0000 1.1 +++ lams_tool_nb/db/sql/insert_lams_tool_nb_data.sql 22 Jun 2005 06:34:47 -0000 1.2 @@ -1,7 +1,8 @@ -- test data for noticeboard content table -INSERT INTO tl_lanb11_content (nb_content_id, +INSERT INTO tl_lanb11_content ( uid, + nb_content_id, title, content, online_instructions, @@ -11,7 +12,8 @@ creator_user_id, date_created, date_updated) -VALUES ('2500', +VALUES (null, + '2500', 'Welcome', 'Welcome to these activities', 'Enter the online instructions here', @@ -21,51 +23,17 @@ '2300', now(), NULL); - -INSERT INTO tl_lanb11_session ( nb_session_id, - nb_content_id, - session_start_date, - session_end_date, - session_status) -VALUES ('2400', - '2500', - now(), - now(), - 'Inactive'); --- test data for noticeboard content table - -INSERT INTO tl_lanb11_content (nb_content_id, - title, - content, - online_instructions, - offline_instructions, - define_later, - force_offline, - creator_user_id, - date_created, - date_updated) -VALUES ('5000', - 'Test Noticeboard', - 'Test Noticeboard: Welcome to these activities', - 'Please Enter the online instructions here', - 'Please Enter the offline instructions here', - 0, - 0, - '2300', - now(), - NULL); - -INSERT INTO tl_lanb11_session ( nb_session_id, - nb_content_id, +INSERT INTO tl_lanb11_session ( uid, + nb_session_id, + nb_content_uid, session_start_date, session_end_date, session_status) -VALUES ('6000', - '5000', +VALUES (null, + '2400', + LAST_INSERT_ID(), now(), now(), - 'Inactive'); - - + 'NOT_ATTEMPTED'); \ No newline at end of file Index: lams_tool_nb/db/sql/lams_tool_nb.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/db/sql/Attic/lams_tool_nb.sql,v diff -u Binary files differ