Hello all,
Is it possible to change datatype of custom field from the database after it is created from the studio?
We have a float custom field but want to change to text field. Any help will be appreciated.
Hello all,
Is it possible to change datatype of custom field from the database after it is created from the studio?
We have a float custom field but want to change to text field. Any help will be appreciated.
Does anyone know it?
You will find the vardefs files defining it under custom directory. Then a QR&R will apply those changes or the DB.
Why do you believe you need to change it in the database?
Thank you for answer. Actually, I end up doing in different way. I created text field and copy my data from the older field and then delete it after copying the data.
I checked Vardefs for the module, and just found ‘inline_edit’ & ‘labelValue’ in it.
One of the following methods would help.
<?php
$dictionary['{MODULE}']['fields']['{FIELD}']['dbType']='{TYPE}';
example
<?php
$dictionary['RCP_Receipts']['fields']['mode']['dbType']='float';
Quick Repair & Rebuild and at the bottom , some SQL scripts needs to be executed to make the change at db level.
Run the following SQL query to change the database of the field in the database table.
Example:
ALTER TABLE rcp_receipts modify COLUMN mode float;
Add a new file for the vardefs change as per method no. 1
Quick Repair & Rebuild