update tenant_user_credential_details set state = '' where state is null;
update tenant_user_credential_details set areaCode = '-' where areaCode is null;
alter table tenant_user_credential_details modify state char(1) not null default '1';
alter table tenant_user_credential_details modify areaCode varchar(20) not null default '';
alter table tenant_user_credential_details modify idnum varchar(100) not null default '';
alter table tenant_user_credential_details modify zsbh varchar(100) not null default '';
alter table tenant_user_credential_details modify active tinyint(2) not null default 0;

create index idx_credential_details_areaCode_active_state on tenant_user_credential_details(areaCode,state,active);