<@U6FMKR9R9> Did you make the new field required?
# prisma-whats-new
v
@gauravkaushik Did you make the new field required?
g
Yes
v
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.
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.
Either way, just make the field required after you have the data in, not before.
g
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.
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 😛
👍 1