change case number to biginit

Hi all,

Is there Any Process to change Int filed to bigint

i am trying to convert case number to biginit.

  • You could redefine the dbType of the case_number field from int(11) to bigint(20) in the extension framework.

    Just create a file e.g. \custom\Extension\modules\Cases\Ext\Vardefs\_override_case_number.php with following content:

    <?php
    $dictionary['Case']['fields']['case_number']['dbType']='bigint(20)';
    ?>

    The file name starting with "_override" makes sure that this file is read after sugarfield_case_number.php in the second vardef run.

    Then you should run a quick repair and rebuild, which offers the following SQL command to be executed:

    ALTER TABLE cases   modify COLUMN case_number bigint(20)  NOT NULL auto_increment;

    Remove all the comment and empty lines from the repair window and execute the command.

    It takes some time for the database to complete this command.

    If you want to be sure execute the quick repair and rebuild again to check whether the changes were executed,

    I hope you will not have ans side effects ...

    Harald Kuske
    Principal Solution Architect – Professional Services, EMEA
    hkuske@sugarcrm.com
    SugarCRM Deutschland GmbH

  • Thanks For reply 

    yes i have converted field successfully and its working but in report module i getting error...

    LayoutManager: Class not found:SugarWidgetFieldbigint

  • For the BWC modules you can define a custom Widget Class. For this custom dbtype Bigint you can copy
    include\generic\SugarWidgets\SugarWidgetFieldint.php to
    custom\include\generic\SugarWidgets\SugarWidgetFieldbigint.php
    and rename the class to SugarWidgetFieldBigint

    After QR&R the field should be available to the reporting module.

    Harald Kuske
    Principal Solution Architect – Professional Services, EMEA
    hkuske@sugarcrm.com
    SugarCRM Deutschland GmbH