User Migration

Content Type: Module
Categories: Import/Export

Overview

User Migration module can migrate users between any two User entities that have a generalisation 'System.User'. This allows you to implement a different user management module and migrate all the existing users of your app to it.

Documentation

User Migration

1 Introduction

User Migration module can migrate users between any two User entities that have a generalisation 'System.User'. This allows you to implement a different user management module and migrate all the existing users of your app to it.

This is a one-time admin activity required to be run just after deployment of the application.

Note: Currently module does not support copying the 'Password' hashed attribute of System.User.

2 Prerequisites

To perform a user migration, you need the following prerequisites:

  • A copy of the User Migration module imported into your app from Marketplace.
  • An existing user management module using an entity with the generalization 'System.User'.
  • A new user management module which also uses an entity with the generalization 'System.User'.
  • Add all attributes and associations that you want to migrate to the Domain Model of the new user management module.
  • Add the microflow StartMigrationWizard in the USE_ME section of the UserMigration module to the navigation or pages which can be accessed by administrators of the app (Refer below screenshots).

3 Migrating Users

To migrate your users, follow the instructions below. For the examples, assume that you are migrating users from the default Mendix user management module, Administration to the SAP module, SapAuthentication.

 

Note: You should migrate your users immediately after first deploying the app containingthe new user management functionality. Until you do this, your existing users will not

be able to sign in to the app.

If you have specializations of the user entities you are migrating, you must migrated the specializations first followed by the main account entity. For example, if you have specialized your Account entity into CompanyA_Account and CompanyB_Account, you must migrate CompanyA_Account and CompanyB_Account into their related specializations of your new account entity (for example CompanyA_NewAccount ) before migrating Account.

 

  1. Sign in to your app with the default administrator account.
  2. Run the microflow StartMigrationWizard from wherever it has been placed in the administration functions of the app.
  3. Select the user entity being used by the old user management module. The dropdown list will show only entities which have a generalization of 'System.User'. In our example, this is 'Authentication.Account' (Refer below screenshots).
  4. Select the user entity being used by the new user management module. In our example, this is 'SapAuthentication.SapUser'.
  5. Click Map according to names to map attributes with the same names. This means, for example, that data in the 'Email' attribute in 'Authentication.Account' will be migrated to the 'Email' attribute in 'SapAuthentication.SapUser' (Refer below screenshots).
  6. Edit any mappings which are missing or incorrect using the Edit buttons. 
    • Note: Attributes must be of same type.
  7. Click Next.
  8. Click Edit next to set up any associations from the old entity that you want to migrate to the new entity (Refer below screenshots).
    • Note: As with the new attributes, the new associations must already exist in the Domain Model for the new user management module and must have the same multiplicity and ownership as the association they are being mapped from.
  9. Click Next.
  10. Check Keep … users after migration to keep the existing user in the old account entity after migration. The message will contain the name of the entity which will be retained, for example 'Administration.Account' (Refer below screenshots).
    • Note: If you keep the old users after migration, the new user created will have the '_new' postfix for the Name attribute of System.User, since System.User/Name must be unique.
  11. Click Migrate.

 

Your users have now been migrated to the new user management module.

Releases

Version: 2.0.2
Framework Version: 9.24.0
Release Notes: - Fixed bug to include incoming associations in the migration
Version: 2.0.1
Framework Version: 9.24.0
Release Notes: Fixed bug related to migrating associations
Version: 2.0.0
Framework Version: 9.24.0
Release Notes: Upgraded to Mendix v9.24.0
Version: 1.0.1
Framework Version: 8.18.10
Release Notes: Bug fix related to association skip
Version: 1.0.0
Framework Version: 8.15.1
Release Notes: Initial upload