Database Cleanup Activity

Step 1 : Truncate Following Tables from Database

Database : mosip_resident

Schema : resident

Tables :

truncate table resident.otp_transaction;
truncate table resident.resident_transaction

 

Database : mosip_regprc

Schema : regprc

Tables :

truncate table regprc.registration_transaction CASCADE;
truncate table regprc.registration CASCADE;
truncate table regprc.registration_list;
truncate table regprc.reg_verification;
truncate table regprc.anonymous_profile;
truncate table regprc.additional_info_request;
truncate table regprc.abis_request CASCADE;
truncate table regprc.abis_application;

 

Database : mosip_print

Schema : print

Tables :

truncate table print.print_transaction;

 

Database : mosip_prereg

Schema : prereg

Tables :

truncate table prereg.anonymous_profile;
truncate table prereg.applicant_demographic CASCADE;
truncate table prereg.applicant_demographic_consumed CASCADE;
truncate table prereg.applications;
truncate table prereg.batch_job_instance CASCADE;
truncate table prereg.intf_processed_prereg_list;
truncate table prereg.otp_transaction;
truncate table prereg.processed_prereg_list;
truncate table prereg.reg_appointment;

 

Database : mosip_pms

Schema : pms

Tables :

truncate table pms.otp_transaction;

 

Database : mosip_master

Schema : master

Tables :

truncate table master.batch_job_instance cascade;

 

Database : mosip_kernel

Schema : kernel

Tables :

truncate table kernel.otp_transaction;
truncate table kernel.uin_assigned;
truncate table kernel.vid_assigned;
update kernel.prid set prid_status = 'AVAILABLE';
update kernel.uin set uin_status = 'UNUSED';

 

Database : mosip_idrepo

Schema : idrepo

Tables :

truncate table idrepo.credential_request_status;
truncate table idrepo.channel_info;
truncate table idrepo.uin cascade;
truncate table idrepo.uin_auth_lock;
truncate table idrepo.uin_biometric_draft;
truncate table idrepo.uin_biometric_h;
truncate table idrepo.uin_document_draft;
truncate table idrepo.uin_document_h;
truncate table idrepo.uin_draft;
truncate table idrepo.uin_h;
truncate table idrepo.anonymous_profile;

 

Database : mosip_idmap

Schema : idmap

Tables :

truncate table idmap.vid;
truncate table idmap.vid_seed;
truncate table idmap.vid_seq;

 

Database : mosip_ida

Schema : ida

Tables :

truncate table ida.anonymous_profile;
truncate table ida.auth_transaction;
truncate table ida.batch_job_instance cascade;
truncate table ida.credential_event_store;
truncate table ida.hotlist_cache;
truncate table ida.identity_cache;
truncate table ida.kyc_token_store;
truncate table ida.otp_transaction;
truncate table ida.uin_auth_lock;
truncate table ida.uin_hash_salt;
truncate table ida.data_encrypt_keystore;

 

Database : mosip_credential

Schema : credential

Tables :

truncate table credential.batch_job_instance cascade;
truncate table credential.credential_transaction;

 

Database : mosip_audit

Schema : audit

Tables :

truncate table credential.batch_job_instance cascade;
truncate table credential.credential_transaction;

 

Step 2 : clear ABIS Cache

 

Step 3 : Clean the files in mnt/Landing path in Group 1 pod
cd /mnt/landing/
rm -rf *.zip
ls

Step 4 : Delete Objects from below mentioned buckets from Minio

idrepository
maprtner-default-abis
maprtner-default-adjudication
maprtner-default-auth
maprtner-default-euin
maprtner-default-resident
packet-manager
prereg

 

Step 5 : Restart pods from regproc, idrepo, ida, biosdk, prereg, kernel, keymanager namespace