do $$ begin	
	IF EXISTS(select * from information_schema.columns WHERE table_name='T_CDA_DGN_SPECIFIED_DEGREE_OF_VALIDITY_AKENEO' and column_name='diagnosisdescription')
		then
		ALTER TABLE AKUZ.T_CDA_DGN_SPECIFIED_DEGREE_OF_VALIDITY_AKENEO ALTER COLUMN "diagnosisdescription" TYPE text;
		UPDATE AKUZ.T_CDA_DGN_SPECIFIED_DEGREE_OF_VALIDITY_AKENEO SET "diagnosisdescription" = '' WHERE "diagnosisdescription" IS NULL;
		ALTER TABLE AKUZ.T_CDA_DGN_SPECIFIED_DEGREE_OF_VALIDITY_AKENEO ALTER COLUMN "diagnosisdescription" SET NOT NULL;
		END IF;	
end; $$;