Open TamsynJennifer4 opened 5 months ago
Hey,đ thanks for raising this! I'm going to transfer this over to our API repository for better assistance đ
Hey @TamsynJennifer4, Thank you for bringing this to our attention. Unfortunately, there is no built-in feature for performing bulk updates in this case. After adding the property to the schema, you can update the field by writing a one-time Lambda function to retrieve the list of users and update them in a loop.
Thanks for the information. Is this a road-map feature for the API? I'm sure there are hundreds of teams running migrations on a daily basis and a simple API to handle this would greatly benefit the community.
Environment information
Description
I have setup a data backend running in production and I am now updating a modal, say:
I wish to add a new field to that model, say
isVerifed
which will be a boolean. For all current users this field will not exist and I will need to update those users to betrue
. How is it best to make this change? Willamplify-backend
provide utils for this such cases to ensure that the data meets the scheme shape I already have. There are obviously a few ways one could try script this or attempt to handle migrations but none feel robust.Is amplify developing an API for this or what are the best practises in handling these changes?