drop index if exists iszl.ix_t_insured_fio;
drop trigger if exists insured_fio on iszl.t_insured;

alter table iszl.t_insured drop column if exists fio;

alter table iszl.t_insured
add column fio varchar(122) generated always as (
    replace(
        upper(
            lastname || chr(160) || firstname || coalesce(chr(160) || patronymic, chr(160))
        ),
        'Ё', 
        'Е'
    )
) stored;

create index ix_t_insured_fio on iszl.t_insured (fio);