V8.6 Database Column Data Types

Hello,
I had to change the data type of the “description” column in some tables from TEXT to MEDIUMTEXT.

  1. Will the SuiteCRM 8.6 code change the data types back to TEXT during regular operation?
  2. Will the data type be changed back during future updates?

Thanks

Which module(s) have you done this for?

And have you changed the data type in the vardefs files also?

You will find those files at the below location.

YOURCRM/public/legacy/custom/Extension/modules/MODULE_NAME/Ext/Vardefs/

1 Like

At the moment I am testing this only for the “calls” table in the database.
(The AI transcripts of calls often need more than the ~64k characters that a TEXT column allows for.)

I started using SuiteCRM less than a week ago, so I was not aware of the vardef files.
Will look into the vardef files and keep a changed copy in case an update will overwrite my customization.

Thanks a lot.

The 2 vardef files in “. . . /public/legacy/custom/Extension/modules/Calls/Ext/Vardefs/” _override_sugarfield_direction.php and _override_sugarfield_status.php only contain a few rudimentary entries, but nothing indicating the datatype of the “description” column.

I used HeidiSQL to change the datatype directly in the database.
Perhaps I should have done it a different way via the SuiteCRM Admin frontend?

Yeah. You could try using admin->studio->calls->fields option from admin dashboard.

Thanks RSP.

The frontend in admin->studio->calls->fields->description does not allow to change the field’s datatype.

The table “fields_meta_data” in the database (seems) to hold configuration data of custom fields.
The “description” column of the calls table (module) is not a custom field.

So far the datatype of the “description” column stays MEDIUMTEXT and no AI transcripts were truncated.

But a stable solution would be great because I am planning to change the “description” column of other tables (modules) to MEDIUMTEXT as well.

In that case, I think you have to create custom fields with required datatype. :face_with_peeking_eye: :sweat_smile:

Will take my chances and customize the columns datatype directly in the database.
Will change the frequency of database backups to twice a day and see what happens.
Backups of the file system once a night should be sufficient.

The plan is to use a fresh SuiteCRM installation for each project, so I will go with custom “description” fields where needed in the next project.

Thanks for your help.

That’s a good plan. All the best :smiley: :+1:

Thanks RSP.

Actually according to ChatGPT the structure of a module’s vardefs.php file is:

$dictionary['Account']['fields']['field_name'] = array (
    'name' => 'field_name',
    'vname' => 'LBL_FIELD_NAME',
    'type' => 'varchar', // Data type defined here
    'len' => '255',
);

I will try that and hope for the best.

1 Like