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


	CREATE TABLE IF NOT EXISTS public."ProjectAttributeLinks"
	(
  	  "Id" bigserial NOT NULL,
  	  "ProjectId" bigint NOT NULL, 
  	  "AttributeId" bigint NOT NULL,  
    	  "Values" text, 
  	  CONSTRAINT "ProjectAttributeLinks_pkey" PRIMARY KEY ("ProjectId","AttributeId")
	);
	CREATE INDEX IF NOT EXISTS "IDX_ProjectAttributeLinks-ProjectId"
 	   ON public."ProjectAttributeLinks" USING btree
  	  ("ProjectId" ASC NULLS LAST)
  	  TABLESPACE pg_default; 
 
        EXCEPTION
            WHEN duplicate_table THEN RAISE NOTICE 'Can not Create table <ProjectAttributeLinks>.';
        END;
    END;
$$
