Base solution for your next web application
Open Closed

Using Migrator with MultiTenancy set to False #1933


User avatar
0
cmthomps created

We're seeing an issue when we use the migrator related to Multi-Tenancy. Our application is not multi-tenant so we have set Configuration.MultiTenancy.IsEnabled = false; in the core module. When the database gets created for the first time it inserts a record into abpLanguages with a tenantid = 1. The problem is that every time we run the migrator after that it inserts another record into the abpLanguages table with a tenantid = 1. So we are ending up with one English record with a tenantid =1 for each time we run the migrator.

We don't run into this problem if we use package-manager update-database.

Thoughts? Thanks, Craig


4 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    Thank you for reporting this. We'll test it in a short time. I created an issue: <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/issues/391">https://github.com/aspnetzero/aspnet-zero/issues/391</a> Please follow it.

  • User Avatar
    0
    cmthomps created

    Thank you!

  • User Avatar
    0
    mihalicz created

    We are also having this issue for the migrator only. Is there a workaround?

    The link to github issue did not work for me, maybe more is there?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    We didn't solve this yet. Please share your github username and we will invite you to private repository.

    For a temporary solution, try to enable multiTenancy in migrator tool before running migrations. See this topic for workaround #1938.