Announcement

Collapse
No announcement yet.

Is there a way or extension that could export/import a single entity definitions?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there a way or extension that could export/import a single entity definitions?

    Hi,

    I am trying to create a new instance of Espocrm for Claims. Under an existing instance, Insurance, I have an entity called "member". Now i want to export only the entity definitions from Insurance and import it into the Claims instance.

    Appreciate any help from forum members.

  • #2
    Perhaps copy the entityDefs json-file content from inszrance to another json file named claims. There could also be involved the clientDefs.

    Comment


    • #3
      You can utilize export/import extension to migrate an entity type between instances. https://docs.espocrm.com/extensions/...-import-usage/. But there's no ability to rename an entity type as far as I know.

      Comment


      • #4
        yuri

        I am trying export an entity called "Doctor" from the instance but nothing seems to be exported. This is the Command i used:

        PHP Code:
        php bin/command export-import export --format=json --export-path="build/ExportImport/Export" --entity-type-list="Doctor" --customization=true 

        Comment


        • #5
          murugappan,

          As of publication date 02/09/2024:
          • If it's a custom Entity, you can't transfer it separately without the structure (without the --customization option).
          • If it is a system Entity and it has relationships with other entities, then the relationships will not carry over either. It's the same story with custom fields for system entities: they won't migrate.
          In the plans of the developers, there is a desire to implement the export-import of selected entities and their customizations, rather than the general structure and data of all entities (as is happening now). Therefore, if this procedure is not very urgent for you, then it makes sense to wait for updates.
          It will be implemented approximately in the next one or two weeks.​

          However, if you need it urgently (or just for testing), you can use the following commands:​

          For export:
          Code:
          bin/command export-import export --format=json --pretty-print --entity-type-list="Doctor" --export-path="/var/www/html/build" --customization​
          For import:
          Code:
          bin/command export-import import --format=json --import-path="/var/www/html/build" --entity-type-list="Doctor" --customization​

          Comment


          • #6
            victor Thank you for the advise. I tried the command and it worked only too well. It exported all the customization (as stated in the documentation). What i need was only those for the "Doctor" entity.

            From the documentation, i do not see the anyway i could export the definition of an entity. When i tried to export the account entities, it was trying to export the entire data as well. Perhaps i do not understand the documentation well.

            May have to resolve to the conclusion that i might have to do all the definitions manually. The thought terrifies me but i guess that is the only way.
            Last edited by murugappan; 02-10-2024, 01:34 AM.

            Comment


            • #7
              The new version 2.0.0 version export-import extension worked well. Download here: https://github.com/espocrm/ext-export-import/releases

              To export from version < 7.3. As all i wanted was to export and import the customization only to another instance for re-engineering. This is what i did:
              1. Create a 8.1.4 instance and copied the custom->espo folder to the new instance
              2. Did a hard rebuild on the new instance
              3. Used the export-import and exported the customization without the relationships.
              4. Copied the exported folders to the instance which i was re-engineering
              5. Perform the import.

              Everything worked super well. I greatly appreciate how much effort this has saved me. This cut down my re-engineering time by 45%. Thank you to t@tmachyshyn .

              Comment

              Working...
              X