@gauravkaushik Did you make the new field required?
g
gauravkaushik
11/10/2017, 12:05 PM
Yes
v
Vinnie
11/10/2017, 12:06 PM
well, surely, if it’s required, you already have the values you intend to enter for all the existing records — in that case you could start adding the field as non-required, in which GC should not ask for a migration value, then add all unique values in, then make the field required once you have all the data in and before you enter any new record.
Vinnie
11/10/2017, 12:08 PM
Or if you don’t have the data, you can use the same principle as I described, but enter random values as you yourself asked.
Vinnie
11/10/2017, 12:08 PM
Either way, just make the field required after you have the data in, not before.
g
gauravkaushik
11/10/2017, 12:52 PM
Thanks! I think your solution will work in this case. But hypothetically speaking, in highly concurrent systems where multiple objects of that type are getting generated in a matter of seconds, I might miss the newly generated ones while the migration is underway. I think it'll be a better alternative if we had a way to somehow reference existing fields when specifying migrationValues for the new field.
gauravkaushik
11/10/2017, 12:54 PM
But well, this seems quite tedious to implement on graphcool's end. So, I'll wait to raise it as a FR till my application reaches that scale 😛