sql/projectdirectory.sql
authorAlan Knowles <alan@roojs.com>
Mon, 17 Mar 2014 08:03:46 +0000 (16:03 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 17 Mar 2014 08:03:46 +0000 (16:03 +0800)
sql/projectdirectory.sql [new file with mode: 0644]

diff --git a/sql/projectdirectory.sql b/sql/projectdirectory.sql
new file mode 100644 (file)
index 0000000..057f716
--- /dev/null
@@ -0,0 +1,18 @@
+
+-- we duplicate office_id and company_id here...
+-- not sure if we should keep doing that in the new design...
+-- we should improve our links code to handle this..
+
+
+CREATE TABLE ProjectDirectory (
+  id int(11) NOT NULL auto_increment,
+  PRIMARY KEY  (id)
+) ;
+
+ALTER TABLE  ProjectDirectory ADD COLUMN   project_id int(11) NOT NULL DEFAULT 0;
+ALTER TABLE  ProjectDirectory ADD COLUMN   person_id int(11) NOT NULL DEFAULT 0;
+ALTER TABLE  ProjectDirectory ADD COLUMN   ispm int(11) NOT NULL DEFAULT 0;
+ALTER TABLE  ProjectDirectory ADD COLUMN   role varchar(32) NOT NULL DEFAULT '';
+
+ALTER TABLE ProjectDirectory ADD INDEX plookup (project_id,person_id, ispm, role);
+