db/db-schema.sql
changeset 85 3ef84ec492fa
parent 83 f7553032b302
child 91 494b3b9db463
--- a/db/db-schema.sql	Fri Apr 27 16:18:28 2012 +0200
+++ b/db/db-schema.sql	Tue May 01 21:40:36 2012 +0200
@@ -201,6 +201,10 @@
     "updated_by" bigint
   );
 create sequence "comment_id_seq";
+create table "project_company" (
+    "project" bigint not null,
+    "company" bigint not null
+  );
 -- foreign key constraints :
 alter table "address" add constraint "addressFK1" foreign key ("city_id") references "city"("id");
 alter table "city" add constraint "cityFK2" foreign key ("country_id") references "country"("id");
@@ -220,8 +224,11 @@
 alter table "company_contact" add constraint "company_contactFK8" foreign key ("contact") references "contact"("id") on delete cascade;
 alter table "user_contact" add constraint "user_contactFK9" foreign key ("entity") references "user"("id") on delete cascade;
 alter table "user_contact" add constraint "user_contactFK10" foreign key ("contact") references "contact"("id") on delete cascade;
+alter table "project_company" add constraint "project_companyFK19" foreign key ("project") references "project"("id") on delete cascade;
+alter table "project_company" add constraint "project_companyFK20" foreign key ("company") references "company"("id") on delete cascade;
 -- composite key indexes :
 alter table "company_contact" add constraint "company_contactCPK" unique("entity","contact");
 alter table "user_contact" add constraint "user_contactCPK" unique("entity","contact");
+alter table "project_company" add constraint "project_companyCPK" unique("project","company");
 -- column group indexes :
 create index "user_deleted_active_idx" on "user" ("deleted","active");