Set "hasUniqueValue" for existing property to "true" in App Object
SOLVE
I am using the new App Objects beta feature in my app. I defined the schema of the object and pushed it. However, I now need one of the properties of my object to be unique and I can't update it myself. Here's the error I'm getting when trying to deploy from the CLI:
Cannot change hasUniqueValue from `false` to `true` on existing property axxxxxxxx_subscription_id
I tried removing the property altogether and creating a new one, but that gives me this error:
I’ve faced the same issue. This is a common limitation in HubSpot — it doesn’t allow updating a non-unique property to unique due to integrity constraints. However, what’s confusing is that even after deleting the property, HubSpot still doesn’t allow creating a new one with the same name and a unique constraint. This seems to be a HubSpot-side issue.
The only workaround is to create a new property with a different name and set it as unique during creation — that’s what I did, and it resolved the problem.
I’ve faced the same issue. This is a common limitation in HubSpot — it doesn’t allow updating a non-unique property to unique due to integrity constraints. However, what’s confusing is that even after deleting the property, HubSpot still doesn’t allow creating a new one with the same name and a unique constraint. This seems to be a HubSpot-side issue.
The only workaround is to create a new property with a different name and set it as unique during creation — that’s what I did, and it resolved the problem.