How to change Existing Field Data type ?

How to change Existing Field Data type ?

Exa. int to Float

You may go through this, https://docs.suitecrm.com/blog/creating-custom-field-types/

Hello …

sir Float field already exist in studio or Support Crm .
i want to only change existing int field to float without losing of data.

Oh.

If you have a core field. then you need to change vardefs.php modules//vardefs.php

Or if you have created a custom field. Then if you have some knowledge of SQL you can change the field type in the fields_meta_data table manually.

If you are making changes like this I would suggest taking a backup just to be safe.

I fallowed Same step but i am unable to repair repair screen displayed blank.
@If you have a core field. then you need to change vardefs.php modules//vardefs.php

check suitecrm.log & apache.log. You can get the reason why it throws a blank screen.

I got This Error…

Wed Aug 8 12:01:08 2018 [5336][ede84399-71df-5962-1e68-590dd0a64b0e][FATAL] Executing repair query: Query Failed: ALTER TABLE total_d modify COLUMN total float(255) NULL: MySQL error 1063: Incorrect column specifier for column ‘total’

You should have to change the relative value of length and etc.

You need to play around it. Here is some insight about the error you are fetching. https://stackoverflow.com/questions/18347282/incorrect-column-specifier-for-column/18347325

If you are making changes like this I would suggest taking a backup just to be safe.

1 Like

Working…

Cheers!!

1 Like