- Issue created by @jkingsnorth
- Issue was unassigned.
- π¬π§United Kingdom jkingsnorth
Oh man I thought this was going to be straightforward, but it looks like that isn't the case. there's a whole developer module (https://git.drupalcode.org/project/field_type_converter/-/blob/1.0.x/src...) which supports field type changes because it needs a new field creating rather than updating the existing one? Am I missing something here?
- Status changed to Needs review
5 months ago 2:43pm 27 June 2024 - π¬π§United Kingdom jkingsnorth
Right, I found some guidance here https://www.drupal.org/docs/drupal-apis/update-api/updating-entities-and... β and had a go at this change based on that documentation. Here's a MR: https://git.drupalcode.org/project/rest_log/-/merge_requests/13
Would appreciate thoughts/feedback. My concern is that the update could take a long time to apply if there is a lot of data in the table!
- First commit to issue fork.
- Merge request !14#3457557 Update rest_log entity request_uri length to 2048 β (Open) created by ad0z
- π΅π±Poland ad0z
@JKingsnorth I don't think there is a need to update field type from string to long_string, as string is representation of varchar which max lenght is 65,535 characters.. and as you mention we would have to take care of migration data, I don't think foreach and single update query would be a good idea, because it would take too much time for bigger sets of data. (maybe chunks could be better.. still it's not needed in my opinion)
I've created simple hook update to set column schema length value to 2048, and added needed changes to rest_log entity to apply it to new installations.
Could you test it and review the merge request? https://git.drupalcode.org/project/rest_log/-/merge_requests/14 - Status changed to Fixed
4 months ago 7:43pm 26 July 2024 - π΅π±Poland ad0z
I've added explicitly limiting of request_uri to 2048 characters to prevent errors when it exceeds the max length. Merge request merged to 2.x.
Automatically closed - issue fixed for 2 weeks with no activity.
- π¬π§United Kingdom jkingsnorth
Thanks for the fix, apologies for the delayed response.