AdminUI comes with a tool to run all the necessary migrations. Alongside its own migrations, AdminUI can optionally run and maintain your IdentityServer4 and or Identity migrations, or you can handle them yourself. If you own SAML2P or WS-Fed, and wish to use its respective features within AdminUI, you will need to run their migrations.
By navigating to your AdminUI install directory and locating the IdentityExpress.Manager.Api.dll you can you run the dll using
dotnet IdentityExpress.Manager.Api.dll -migrate <migration-to-run>
AdminUI has a number of different migrations that need to be run, you can run one individually or choose to run them all at once.
The different migrations options are:
|All||Runs all the migrations (Recommended for Demo users)|
|Configuration||IdentityServer4 Configuration Migration|
|ExtendedConfiguration||AdminUI IdentityServer4 extension|
|Operational||IdentityServer4 Operational migration|
|Identity||ASP Identity Migration|
|Audit||RSK AdminUI Audit Migration|
|Saml||SAML2P Component migration|
|WsFed||Ws-Federation Component migration|
A help function may be accessed by adding -help
You may also specify a connection string and which database provider you are you using with -connectionstring and -dbprovider. The connection string must be valid and surrounded by quotes. If no connectionstring and dbprovider are given, the migration tool will look in the Api’s webconfig for the values.
If you are using SqlServer 2008 or earlier you will need to set - uselegacypaging to true
If the container is not running and you would like to run migrations use the following command
docker run -e "DbProvider=<YourProvider>" -e "IdentityConnectionString=<YourConnectionString>" -e IdentityServerConnectionString="<YourConnectionString>" --entrypoint dotnet identityserverregistry.azurecr.io/idxapi IdentityExpress.Manager.Api.dll -migrate all
Note - The full list of configuration options is avaliable here
If the container is already running the steps to run migrations are as follows:
- Find the container ID by running the “docker container ps” command
- Once found, you can exec the command as follows:
docker exec <container-id> dotnet IdentityExpress.Manager.Api.dll -migrate all
Note - This will use the environment variables already passed into the container.
You will see the output of the migrations in your command line window.