diff -r ad2fe2f9bac7 -r f7553032b302 db/db-schema.sql --- a/db/db-schema.sql Fri Apr 27 14:15:51 2012 +0200 +++ b/db/db-schema.sql Fri Apr 27 14:23:34 2012 +0200 @@ -190,6 +190,17 @@ "updated_by" bigint ); create sequence "task_id_seq"; +create table "comment" ( + "name" varchar(100) not null, + "updated_at" timestamp not null, + "task_id" bigint not null, + "id" bigint primary key not null, + "note" varchar(10240), + "created_at" timestamp not null, + "created_by" bigint, + "updated_by" bigint + ); +create sequence "comment_id_seq"; -- 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"); @@ -204,6 +215,7 @@ alter table "task" add constraint "taskFK15" foreign key ("task_type") references "code_list_item"("id"); alter table "task" add constraint "taskFK16" foreign key ("state") references "code_list_item"("id"); alter table "task" add constraint "taskFK17" foreign key ("project_id") references "project"("id"); +alter table "comment" add constraint "commentFK18" foreign key ("task_id") references "task"("id") on delete cascade; alter table "company_contact" add constraint "company_contactFK7" foreign key ("entity") references "company"("id") on delete cascade; 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;