Index: openacs-4/packages/contacts/sql/postgresql/contacts-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/sql/postgresql/contacts-drop.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/contacts/sql/postgresql/contacts-drop.sql 8 Sep 2005 18:14:00 -0000 1.5 +++ openacs-4/packages/contacts/sql/postgresql/contacts-drop.sql 12 Sep 2005 14:12:22 -0000 1.6 @@ -6,6 +6,7 @@ -- -- +drop table contact_search_extend_map; drop table contact_search_conditions; drop table contact_searches; drop table contact_extend_options; Index: openacs-4/packages/contacts/sql/postgresql/contacts-search-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/sql/postgresql/contacts-search-create.sql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/contacts/sql/postgresql/contacts-search-create.sql 8 Sep 2005 18:14:00 -0000 1.6 +++ openacs-4/packages/contacts/sql/postgresql/contacts-search-create.sql 12 Sep 2005 14:12:22 -0000 1.7 @@ -157,4 +157,20 @@ pretty_name varchar(100) not null, subquery varchar(5000) not null, description varchar(500) +); + +-- Creates a table to map contact_extend_options(extend_id)'s to +-- contact_searches(search_id) + +create table contact_search_extend_map ( + search_id integer + constraint contact_search_extend_map_search_id_fk + references contact_searches (search_id) + on delete cascade, + extend_id integer + constraint contact_search_extend_map_extend_id_fk + references contact_extend_options (extend_id) + on delete cascade, + constraint contact_search_extend_map_pk + primary key (search_id,extend_id) ); \ No newline at end of file Index: openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.0d10-1.0d11.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.0d10-1.0d11.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.0d10-1.0d11.sql 12 Sep 2005 14:07:32 -0000 1.1 @@ -0,0 +1,17 @@ +-- Author Miguel Marin (miguelmarin@viaro.net) +-- Author Viaro Networks www.viaro.net +-- Creates a table to map contact_extend_options(extend_id)'s to +-- contact_searches(search_id) + +create table contact_search_extend_map ( + search_id integer + constraint contact_search_extend_map_search_id_fk + references contact_searches (search_id) + on delete cascade, + extend_id integer + constraint contact_search_extend_map_extend_id_fk + references contact_extend_options (extend_id) + on delete cascade, + constraint contact_search_extend_map_pk + primary key (search_id,extend_id) +); \ No newline at end of file