Question

Error when Incrementing View version

  • 13 May 2024
  • 1 reply
  • 5 views

Badge

Hi all,

I'm trying to increment my view version.

To do this, I'm also incrementing my data model version as well.

My original is
```
type Test @view(space: "test_space", version: "1_0"){
    name: String!,
    description: String,
}
```
and I try to go to


```
type Test @view(space: "test_space", version: "1_1"){
    name: String!,
    description: String,
    test_write: String
}
```

I've also tried
 
```
type Test @view(space: "test_space", version: "1_2"){
    name: String!,
    description: String,
    test_write: String,
    required_test_write: String!
}
```


I get this error: 

{
  "title": "Error: could not update data model",
  "message": "An error has occured. Data model was not published.",
  "extra": {
    "type": "div",
    "key": "errors",
    "ref": null,
    "props": {
      "style": {
        "display": "block",
        "overflowX": "hidden",
        "overflowY": "auto",
        "maxHeight": "150px"
      },
      "children": {
        "type": "ul",
        "key": null,
        "ref": null,
        "props": {
          "style": {
            "paddingLeft": "16px"
          },
          "children": [
            {
              "type": "li",
              "key": "[Line: 242] Can not change the view source\n            You likely modified the type of a relation field. Please publish a new data model version.",
              "ref": null,
              "props": {
                "style": {
                  "whiteSpace": "pre-wrap"
                },
                "children": "[Line: 242] Can not change the view source\n            You likely modified the type of a relation field. Please publish a new data model version."
              },
              "_owner": null
            }
          ]
        },
        "_owner": null
      }
    },
    "_owner": null
  }
}


1 reply

Userlevel 4
Badge

@Nick , You will need to update the version of the views that refer to the view being updated.

-Jason

Reply