Ends in:
0 DAY
16 HRS
54 MIN
8 SEC
Ends in:
0 D
16 H
54 M
8 S
Open Closed

ABP IO Database migration #7031


User avatar
0
Michael-Genisys created

Related to this article: https://docs.abp.io/en/abp/latest/Entity-Framework-Core-Migrations

Hi,

In my case, I have a multi-tenant installation. One host database and many tenant databases (almost 70) and I would like to merge it all into the host database or into a single one database. (one for the host and one for all tenants)

Is there a way to do it easyly or I have to do it manually by migrated sql data of every tenant ?

Thanks,


4 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Creating a new database is easy for tenants, but unfortunately, you'll need to migrate the data manually.

  • User Avatar
    0
    Michael-Genisys created

    Hi,

    I have multiple questions.

    How many tenants can we have into the same database ? Is there a limit ? Is there any suggestion regarding performance?

    Do you know if I have something special to manage tenant properly or just inserted data in the new database with tenantId that belongs to the old database will work ?

    Do you think both solutions works ? I prefer the 2 solutions :)

    1 - Create a shared tenant in the host database and after the tenant tables was created, and after moving data inside from each tenant database.After that I will change the tenant connection string to connect on the shared database 2 - Create a new shared database that contains only tenant tables, and after moving data inside from each tenant database. After that I will change the tenant connection string for new database

    ( do i need to create a new tenant or only database is ok? my plan is to start from a tenant backup and then i will move data )

    I also notice that there are 2 tables (GdprInfo, GdprRequests) in the tenant database that does nt have tenantId, what are these tables for ? They are empty

    Thanks

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    How many tenants can we have into the same database ? Is there a limit ? Is there any suggestion regarding performance?

    No limit, you should evaluate the size of your data, if it is large you should use a separate database

    Do you know if I have something special to manage tenant properly or just inserted data in the new database with tenantId that belongs to the old database will work ?

    Yes, just insert the TenantId

    Do you think both solutions works ? I prefer the 2 solutions :)

    I prefer solution 2, too.

    I also notice that there are 2 tables (GdprInfo, GdprRequests) in the tenant database that does nt have tenantId, what are these tables for ? They are empty

    You can check this https://commercial.abp.io/modules/Volo.Gdpr

  • User Avatar
    0
    Michael-Genisys created

    Thanks for all your answers.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19