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