Defect #3336
closedWrong provisioning mapping and mixed identifiers after migrating accounts to version 13
100%
Description
After migrating account with the SQL: https://github.com/bcvsolutions/CzechIdMng/blob/develop/MIGRATION.md#-database (from #3309), provisioning of accounts (entity event IdmIdentity NOTIFY) fails with an exception saying "Duplicate uid for account! Uid [honza] already exists. Change uid for account [65d5aa06-8613-4845-9616-812f7cce14a3] on system [f007c3d4-5e50-49ce-8fd2-09564b7afcb3] in mapping [4935b66a-839d-4020-a25a-b35099f8a5d9]"
The cause is probably the provisioning mapping for the account, which was set to some mapping from a different system by the migration script. (I have "LDAP CAS" and multiple other connected systems - DB, virtuals. The mapping should be "LDAP provisioning", but it is "Default provisioning" from one of the virtuals.)
Please improve the SQL migration script. Also, it would be safer if the SQL changed only records with system_mapping_id=null (after repeatedly running the SQL, new accounts got also broken).
Files
Related issues