DO $$
BEGIN
INSERT INTO public."ProjectTaskTypes"(
	"Name", "Color", "Type", "IconId", "Order")
	SELECT 'Task', '#66ABE3',3,46,1
WHERE Not exists(SELECT * FROM public."ProjectTaskTypes" WHERE "Type"=3 AND "ProjectId" is null);
 



UPDATE public."ProjectTaskTypes" SET "Color"='#66ABE3',"IconId"=46,"Order"=1 WHERE "Type"=3 AND "ProjectId" is null;


END $$