How can we implement datetime(3) for all datetime values?

Currently, the datetime is a standard MySQL datetime field. However, we have items that happen quickly and the datetime field doesn't reflect quick changes, especially in the _audit tables. Can we change the datetime to be datetime(3) which will capture milliseconds? How can we implement this?

  • Theoricaly speaking you can extends the MysqliManager in order to override the protected attribute $type_map so you can override the respective MYSQL field type for datetimecombo and datetime.

    After that you can update the $sugar_config['dbconfig']['db_manager'] accordingly.

    This will do the db stuff.

    Unfortunately I'm not sure it is packageScan compliance.

    Anyway there would be some more challenges in order to make TimeDate and SugarBean to deal with this new scenario.

    I'm not sure it is even possible, but it is a hint. Perhaps Sugar may need to consider such an improvement, not globally for all datetime fields, instead for an eventual custom field type.

    André Lopes
    Lampada Global
    Skype: andre.lampada