Enhancement
During the security update, rows are added to the SECURITY_STORAGE table. To avoid duplicates, the row with the data is deleted first and then added.
There is a special command in PostgreSQL (as in MySQL) for this purpose
INSERT ... ON CONFLICT DO NOTHING/UPDATE
This can be used here to avoid a previous deletion.