Error while rebuilding database

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • manuel-kraus
    replied
    Oh... I had a second custom Entity, sorry...
    I changed the ID definition of the second one, now everything works.

    Thank you very much

    Leave a comment:


  • tanya
    replied
    Did you create only entity Jobs?

    Leave a comment:


  • manuel-kraus
    replied
    Still get the same error

    Leave a comment:


  • tanya
    replied
    Change id definition.

    "id":{
    "readOnly":true,
    "dbType" : "varchar",
    "len": "24",
    "type": "id"

    },

    Leave a comment:


  • manuel-kraus
    replied
    /application/Espo/Modules/Jobs/Resources/metadata/entityDefs/Jobs.json:
    Code:
    {
    
        "collection": {
    
          "sortBy": "createdAt",
    
          "asc": false
    
       },
    
      "fields": {
    
        "id":{
    
          "type":"varchar",
    
          "readOnly":true
    
        },
    
        "copies":{
    
          "type":"int",
    
          "readOnly":true
    
        },
    
        "description":{
    
          "type":"text"
    
        },
    
        "status":{
    
          "type":"varchar",
    
          "readOnly":true
    
        },
    
        "text":{
    
          "type":"varchar",
    
          "readOnly":true
    
        },
    
        "createdAt":{
    
          "type":"datetime",
    
          "readOnly":true
    
        },
    
        "modifiedAt":{
    
          "type":"datetime",
    
          "readOnly":true
    
        },
    
        "createdBy":{
    
          "type":"link",
    
          "readOnly":true
    
        },
    
        "modifiedBy":{
    
          "type":"link",
    
          "readOnly":true
    
        },
    
        "espressoLink": {
    
          "type":"url",
    
          "readOnly": true
    
        }
    
      },
    
      "links": {
    
        "cases": {
    
          "type": "hasMany",
    
          "relationName": "caseJobs",
    
          "foreign": "jobs",
    
          "entity": "Jobs",
    
          "isCustom": true
    
        },
    
        "createdBy":{
    
          "type":"belongsTo",
    
          "entity":"User"
    
        },
    
        "modifiedBy":{
    
          "type":"belongsTo",
    
          "entity":"User"
    
        }
    
      }
    
    }
    /custom/Espo/Resources/metadata/entityDefs/Case.json:

    Code:
    {
    
        "links": {
    
           "jobs": {
    
                "type": "hasMany",
    
                "relationName": "caseJobs",
    
                "foreign": "cases",
    
                "entity": "Jobs",
    
                "isCustom": true
    
            }
    
        }
    
    }

    Leave a comment:


  • tanya
    replied
    Hello
    Could you attach your entityDefs?

    Leave a comment:


  • manuel-kraus
    started a topic Error while rebuilding database

    Error while rebuilding database

    Hi,
    i have added some Entities, but now i get the following error while rebuilding.

    Code:
     
     [2017-01-31 10:31:25] Espo.ERROR: Fault to rebuild database schema. Details: Incomplete definition. 'columns' required. [] [] [2017-01-31 10:31:25] Espo.ERROR: API [POST]:/Admin/rebuild, Params:Array ( ) , InputData:  - Error while rebuilding database. See log file for details. [] [] [2017-01-31 10:31:25] Espo.ERROR: Display Error: Error while rebuilding database. See log file for details., Code: 500 URL: /api/v1/Admin/rebuild [] []
    Where in my entityDefs should i add 'columns' and what should it contain?

    I hope anyone can help me with this. Thanks
Working...