Expanding the lead ID length

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Expanding the lead ID length

Postby RBecker » Tue Mar 07, 2023 6:49 pm

Our ViciDial instance currently has lead IDs in the 8XXXXXXXX range. Obviously we still have a long ways to go before we hit the max possible lead ID, but we are trying to prepare for the future in case we do hit that limit and need to expand our max lead ID. I can see in the database that the lead_id column in the vicidial_list table has a length of 9, but there are other lead_id columns in other tables which have a longer max length, like vicidial_recording_access_log with 10 digits, vicidial_comments with 11 digits, etc. I can very easily write a query which sweeps through all columns and updates the max length to something longer, but I want to make sure this won't break any functionality elsewhere in the system. I also don't want to introduce display issues or search issues where the full lead ID won't be able to be entered or displayed. Has anyone gone through anything similar and have experience with this?
Managed & Dedicated ViciDial Hosting | VoIP Trunking and Termination | https://www.dial-fusion.com/
Main Cluster: 21 Agent Servers | Dedicated DB and Separate Reports Server | 2 Web Servers | HAProxy Load Balancing | Dedicated Archive Server
RBecker
 
Posts: 43
Joined: Mon Aug 30, 2021 3:05 pm

Re: Expanding the lead ID length

Postby mflorell » Tue Mar 07, 2023 8:38 pm

The maximum value of an unsigned INT in MySQL is 4294967295, so you have quite a long way to go before you hit that. As for the '(9)' in the INT(9) field definition for "lead_id", that doesn't actually mean 9 digits, it means "For integer data types, (M) indicates the maximum display width. The maximum display width is 255. Display width is unrelated to the range of values a type can store",
https://dev.mysql.com/doc/refman/8.0/en ... yntax.html

And that doesn't even mean it actually affects the output from queries including the lead_id either, "The display width does not constrain the range of values that can be stored in the column. Nor does it prevent values wider than the column display width from being displayed correctly",
https://dev.mysql.com/doc/refman/8.0/en ... butes.html

You are at most only 21% of the way there, so you've got some time :)
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Support

Who is online

Users browsing this forum: Bing [Bot] and 108 guests