Index: openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-create.sql,v
diff -u -r1.15 -r1.15.2.1
--- openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-create.sql	30 Mar 2005 18:18:18 -0000	1.15
+++ openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-create.sql	7 Nov 2005 19:40:53 -0000	1.15.2.1
@@ -20,9 +20,14 @@
                                 references cr_folders(folder_id),
   root_keyword_id               integer
                                 constraint bt_projects_keyword_fk
+                                references cr_keywords(keyword_id),
+  component_keyword_id          integer
+                                constraint bt_component_keyword_fk
                                 references cr_keywords(keyword_id)
 );
 
+
+-- this function (bt_project__new) is deprecated since the project creation in handled as a TCL API
 create or replace function bt_project__new(
     integer                      -- package_id
 ) returns integer 
@@ -35,6 +40,7 @@
     v_creation_ip               varchar;
     v_folder_id                 integer;
     v_keyword_id                integer;
+    v_component_keyword_id      integer;
 begin
     select count(*)
     into   v_count
@@ -838,7 +844,20 @@
 create index bt_patch_bug_map_patch_id_idx on bt_patch_bug_map(patch_id);
 create index bt_patch_bug_map_bug_id_idx on bt_patch_bug_map(bug_id);
 
+create table bt_keyword_component_map (
+	keyword_id      integer
+		        constraint bt_component_keyword_fk
+                        references cr_keywords(keyword_id),
+	component_id    integer
+                        constraint bt_patches_components_fk
+                        references bt_components(component_id),
+	constraint bt_keyword_component_map_pk
+	primary key (keyword_id, component_id)
+);
+
+create index bt_keyword_component_map_keyword_idx on bt_keyword_component_map(keyword_id);
+create index bt_keyword_component_map_component_idx on bt_keyword_component_map(component_id);
+
 -- AutoSubmition functionality
 
 \i auto-error-report.sql
-
