Skip to main content
Seasoned ⭐️⭐️⭐️
May 13, 2024 2:09 PM UTC
Solved

Error when Incrementing View version

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
  }
}

Dilini Fernando
Expert ⭐️⭐️⭐️⭐️
May 31, 2024 10:24 AM UTC

Hi @Nick,

As of now, I'm closing this topic. Please feel free to reply to this post if you have any further questions. 

3 replies

Expert ⭐️⭐️⭐️⭐️
May 13, 2024 4:44 PM UTC

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

-Jason

Dilini Fernando
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
May 23, 2024 11:48 AM UTC

Hi @Nick ,

Did you manage to try out Jason’s suggestion?

Dilini Fernando
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
May 31, 2024 10:24 AM UTC

Hi @Nick,

As of now, I'm closing this topic. Please feel free to reply to this post if you have any further questions.