Update Field Config? (grid)Created 3 years ago by vinnydude
How do I go about updating a fields config after a migration? I'd normally just go into the database and update it there, but with the Grid field type, it's not quite as straight forward, doable, but not ideal!
I've had a look in the Grid docs and it says you can update the config via the API, but that is literally all it says!
So how do I go about updating the related grids for a module?
You can use a migration to edit the fields as needed something like this: https://pyrocms.com/documentation/streams-platform/1.7/database/migrations#using-repositories
You would get the field or assignment using
$this->assignments()instead and just change the
configattribute accordingly and then save. Schema and all that will remain in tact.