Skip to main content

Utopia Local DB Refresher

The Utopia local database refresher solution is located in the Utopia repo in the UtopiaLocalDatabaseRefresher folder.

  1. Check that all the requirements are met before running:
    1. Make sure you've stopped the Microsoft Azure Storage Emulator
    2. PG Admin already set up with the local Postgres instance for Utopia
    3. Docker needs to be installed. (Docker Desktop is available on the Company Portal)
    4. Get ElasticSearch Running in Docker (see ElasticSearch Doc)
    5. DbMigratorEF has been rebuilt in debug (Open the Utopia solution, switch to DbMigratorEF and rebuild in debug)
    6. Rebuild UtopiaBatchWorker in debug as well
  2. Open the UtopiaLocalDatabaseRefresher solution
  3. (Optional) Update the "TestUserName" and the "TestUserPassword" to the desired values in appSettings.json 
  4. Ensure you have met the requirements
  5. Run the solution in debug

Azurite Docker Doc

If things are broken and you need to do it manually:

  • Make sure the Azure Storage Emulator or Azurite is running

  • Make sure Elastic Search is running

  • In pgAdmin4 Drop Cascade schemas: public and workflow

  • Right click Schemas

    • Create a schema called “public”

  • In the Utopia solution switch “Set startup project” to DbMigratorEF and run in debug (in command prompt press enter unless need other options)

  • Switch back to Utopia project

  • Run DBInstanceSettingsLocalConfig.sql from Utopia repo

  • Open and run the UtopiaBatchWorker solution