Administrator

Deletion Script

Use the deletion script to remove and deactivate customer-related information, such as mobile phone numbers, passwords, PINs, and payment instruments. The deletion script also removes and marks customers as inactive in the system. Attachments, notes, and change history is also removed. Further processing of financial transactions is impossible.

-- delete information about bank accounts
UPDATE MOB_BANK_ACCOUNTS SET STR_NAME = '###', STR_NAME_BANK = '###', STR_CITY_BANK = '###', STR_INSTITUTION_CODE = '###', 
STR_BRANCH_CODE = '###', STR_ACCOUNT_NUMBER = '###', STR_DISPLAY_NUMBER = '###' WHERE
ID_PI in (SELECT ID_PI FROM MOB_PIS WHERE ID_CUSTOMER = ?);
-- delete information about "other" financial accounts
UPDATE MOB_EXTERNAL_ACCOUNTS SET STR_ID1 = '###', STR_ID2 = '###', STR_ID3 = '###', STR_ID4 = '###', 
STR_ID8 = '###', STR_ID7 = '###', STR_ID6 = '###', STR_ID5 = '###' WHERE
ID_PI in (SELECT ID_PI FROM MOB_PIS WHERE ID_CUSTOMER = ?);
-- delete credit card information
UPDATE MOB_CREDIT_CARDS SET STR_CARD_NUMBER = '###', STR_CARD_HOLDER_NAME = '###', STR_DISPLAY_NUMBER = '###' WHERE
ID_PI in (SELECT ID_PI FROM MOB_PIS WHERE ID_CUSTOMER = ?);
-- delete names of accounts
UPDATE MOB_WALLET SET STR_ALIAS = '###' WHERE ID_CUSTOMER = ?;
-- mark all accounts as inactive
UPDATE MOB_PIS SET BOL_IS_ACTIVE = 'N' WHERE ID_CUSTOMER = ?;
-- delete all identifications, such as mobile phone number and make them inactive
UPDATE MOB_CUSTOMERS_IDENTIFICATIONS SET STR_IDENTIFICATION = '###', BOL_IS_ACTIVE = 'N' WHERE ID_CUSTOMER = ?;
-- delete all passwords and PINs and make them inactive
UPDATE MOB_CUSTOMERS_CREDENTIALS SET STR_CREDENTIAL = '###', BOL_IS_ACTIVE = 'N' WHERE ID_CUSTOMER = ?;
-- delete all identity (e.g. passport) information
UPDATE MOB_CUSTOMERS_IDENTITIES SET STR_IDENTITY = '###', STR_ISSUE_PLACE = '###', STR_ISSUER = '###', BOL_IS_ACTIVE = 'N' WHERE ID_CUSTOMER = ?;
-- delete all general purpose attributes
UPDATE MOB_CUSTOMERS_ATTRIBUTES SET STR_VALUE = '###' WHERE ID_CUSTOMER = ?;
-- delete all binary attachments
UPDATE MOB_ATTACHMENTS SET STR_NAME = '###', BIN_CONTENT = null WHERE ID_CUSTOMER = ?;
-- delete all notes (system generated or manually entered)
UPDATE MOB_NOTES SET STR_SUBJECT = '###', STR_TEXT = '###' WHERE ID_CUSTOMER = ?;
-- mark customer as inactive
UPDATE MOB_CUSTOMERS SET STR_DISPLAY_NAME = '###', STR_SECURITY_QUESTION = '###', STR_SECURITY_ANSWER = '###', STR_REFERRAL_CODE = '###', BOL_IS_ACTIVE = 'N', DAT_DATE_OF_BIRTH = null WHERE ID_CUSTOMER = ?;
-- delete all address information
UPDATE MOB_ADDRESSES SET STR_FIRST_NAME = '###', STR_MIDDLE_NAME = '###', STR_LAST_NAME = '###', STR_TITLE = '###', STR_COMPANY1 = '###', STR_COMPANY2 = '###', 
STR_COMPANY_SHORTNAME = '###', STR_POSITION = '###', STR_STREET1 = '###', STR_STREET2 = '###', STR_HOUSE_NUMBER = '###', STR_ZIP = '###', STR_CITY = '###', 
STR_STATE = '###', STR_PHONE1 = '###', STR_PHONE2 = '###', STR_FAX = '###', STR_EMAIL = '###', STR_URL = '###', STR_NAME_ADDRESS = '###' WHERE ID_CUSTOMER = ?;
-- delete all information regarding change history
UPDATE MOB_HISTORY SET STR_OLD_VALUE = '###', STR_NEW_VALUE = '###' WHERE ID_OBJECT = ?;
UPDATE MOB_HISTORY SET STR_OLD_VALUE = '###', STR_NEW_VALUE = '###' WHERE ID_OBJECT in (SELECT ID_PI FROM MOB_PIS WHERE ID_CUSTOMER = ?);
UPDATE MOB_HISTORY SET STR_OLD_VALUE = '###', STR_NEW_VALUE = '###' WHERE ID_OBJECT in (SELECT ID_ADDRESS FROM MOB_ADDRESSES WHERE ID_CUSTOMER = ?);
UPDATE MOB_HISTORY SET STR_OLD_VALUE = '###', STR_NEW_VALUE = '###' WHERE ID_OBJECT in (SELECT ID_IDENTITY FROM MOB_CUSTOMERS_IDENTITIES WHERE ID_CUSTOMER = ?);
UPDATE MOB_HISTORY SET STR_OLD_VALUE = '###', STR_NEW_VALUE = '###' WHERE ID_OBJECT in (SELECT ID_CUSTOMER_IDENTIFICATION FROM MOB_CUSTOMERS_IDENTIFICATIONS WHERE ID_CUSTOMER = ?);
UPDATE MOB_HISTORY SET STR_OLD_VALUE = '###', STR_NEW_VALUE = '###' WHERE ID_OBJECT in (SELECT ID_CUSTOMER_CREDENTIAL FROM MOB_CUSTOMERS_CREDENTIALS WHERE ID_CUSTOMER = ?);
UPDATE MOB_HISTORY SET STR_OLD_VALUE = '###', STR_NEW_VALUE = '###' WHERE ID_OBJECT in (SELECT ID_NOTE FROM MOB_NOTES WHERE ID_CUSTOMER = ?);
-- commit all data
commit;