Changing field type to decimal 8,2

4 posts by 3 authors in: Forums > CMS Builder
Last Post: November 26, 2008   (RSS)

By zaba - November 26, 2008

Hi,
I want to have a specific field type, in this case decimal, as I am performing calculations on that field. I can manually change it by doing it directly on the mysql database (using CocoaMySQL - a MySql GUI for Mac OSX). I would like to have this as an option in cms builder. If I make any changes in cms builder it reverts back to the default field type. Do I have to alter the ini file for that particular category?

Re: [zaba] Changing field type to decimal 8,2

By Dave - November 26, 2008

Hi zaba,

If you want to actually override the mysql column type you can specify that in CMS Builder's schema file directly in /data/schema/yourSection.ini.php like this:

customColumnType = "int(10) unsigned NOT NULL"

You can have a look at /data/schema/uploads.ini.php for an example.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Changing field type to decimal 8,2

By zaba - November 26, 2008

Thanks Dave,
I'll give it a whirl and see what happens.