Abrir Fechadas

I want to clone tenant. #5500


User avatar
0
portx-dev criada

I want to clone tenant

How would you go about developing such functionality?

Also, if it is difficult to duplicate the tenant, I would like to create a function to export the data of the copy source and import the data to the tenant of the copy destination. Is this possible?


ABP Framework version: Commercial 7.2

UI type: Angular

DB provider: EF Core


8 resposta (s)
  • User Avatar
    0
    maliming criada
    Equipe de Apoio Fullstack Developer

    hi

    I want to clone tenant

    You can get the target tenant info and create a new one.

    if this is not your want please explain it in detail.

  • User Avatar
    0
    portx-dev criada

    Yes, I want to create a new tenant by inheriting all information from the clone source. how do i do that?

  • User Avatar
    0
    jfistelmann criada

    Yes, I want to create a new tenant by inheriting all information from the clone source. how do i do that?

    can you elaborate more on "all information"?

    implementation varies on the specific definition.

    for instance, you can just copy information on the tenant entity. do you want to transfer users as well?

    are there entities that need to be copied as well?

    are there any requirement that you copy created/ updated etc dates of any entities?

    are there any requirements to store information about the source of where data has been copied from?

    Generally spoken, you can do something like extending the tenant entity to store a source tenant. then, you could use DataSeeder's with the tenant filter disabled to perform the stuff you need.

    Depending on your requirements, a background job may be a better fit, as copying data may take a while.

    As you see - it all depends and the devil lies in the details.

  • User Avatar
    0
    portx-dev criada

    thank you.

    ・Data of all entities. ・I want to copy the user and scope as well. ・I want to keep the timestamp.

  • User Avatar
    0
    maliming criada
    Equipe de Apoio Fullstack Developer

    hi

    You can change the current and query all the entities of the tenant and create new for new tenant.

    https://docs.abp.io/en/abp/latest/Multi-Tenancy#change-the-current-tenant

  • User Avatar
    0
    portx-dev criada

    テナントのクローンを作成するためのサンプルコードはありますか?

  • User Avatar
    0
    maliming criada
    Equipe de Apoio Fullstack Developer

    hi

    There is no sample code for now.

    See https://support.abp.io/QA/Questions/5500#answer-3a0cc632-a4b3-d72f-73bf-29adde5c2e25

  • User Avatar
    0
    portx-dev criada

    thx

Made with ❤️ on ABP v8.2.0-preview Updated on março 25, 2024, 15:11