Cannot update a field to be required once already created
I have a model with a simple field I created. In the next migration I wanted to make this field required, however the update was being rejected, even though I was passing a migration value.
When testing I noticed that I had to delete every entry and then I could update the field to be required.
In the UI this isn't an issue as it asks for a migration value. I assume there is some sort of ordering of mutations issue meaning that the migration is rejected?
e.g
model.addSimpleField({
apiId: 'label',
displayName: 'Label',
type: FieldType.String,
isLocalized: true
});
on next run when content has been added (this fails)
model.updateSimpleField({
apiId: 'label',
migrationValue: 'test',
isRequired: true
});
Internal Issue: ENG-3642
Just wanted to drop a word here saying this is still relevant today.
The migration gets rejected with 'FAILED Could not apply schema changes'
@notrab - was there any movement on this one? Could it be solved by your draft PR https://github.com/GraphCMS/management-sdk/pull/20 ?
@joelpierre this should be resolved now, right?
@joelpierre this should be resolved now, right?
I am not sure haven't re-checked since Jan. I just generally avoid it 😅
Hello any update on this issue?
I am having similar issue, trying to do upsert to a model based on the apiId