
DO $$ 
    BEGIN
         IF EXISTS (SELECT "Id" FROM public."Versions" WHERE "Build">=14238) THEN
		RETURN;
          END IF;
 
        BEGIN
  


	CREATE TABLE IF NOT EXISTS public."ProjectTaskAttributeValues"
( 
    "Id" bigserial NOT NULL,
    "AttributeId" bigint NOT NULL, 
    "Value" text, 
    "TaskId" bigint NOT NULL
);

CREATE INDEX IF NOT EXISTS "IDX_ProjectTaskAttributeValues-TaskId-AttributeId"
    ON public."ProjectTaskAttributeValues" USING btree
    ("TaskId"ASC NULLS LAST,"AttributeId"ASC NULLS LAST)
    TABLESPACE pg_default; 
 
        EXCEPTION
            WHEN duplicate_table THEN RAISE NOTICE 'Can not Create table <ProjectTaskAttributeValues>.';
        END;
    END;
$$


