create table signature_check_document
(
    id bigint auto_increment primary key,
    business_id varchar(200),
    business_type varchar(50),
    file_url varchar(500),
    created timestamp not null default current_timestamp,
    processed_result varchar(300),
);

alter table signature_check_document add status int not null default 0;
insert into signature_check_document(business_id,business_type,file_url,created)
select id,'signature_queues_document',file_url,current_timestamp from signature_queues_document
where status=1 and created<'2025-06-20';

alter table signature_queues add column version varchar(10);

create index idx_bg_screening_users_idnum on security_flow.bg_screening_users(idnum);


