Class UpgradeServices

java.lang.Object
org.apache.ofbiz.entityext.data.UpgradeServices

public class UpgradeServices extends Object
Entity Data Upgrade Services
  • Constructor Details

    • UpgradeServices

      public UpgradeServices()
  • Method Details

    • generateMySqlFileWithAlterTableForTimestamps

      public static Map<String,Object> generateMySqlFileWithAlterTableForTimestamps(DispatchContext dctx, Map<String,Object> context)
      Generate sql file for data migration from mySql.5 and earlier version to mySql.6 to later version mySql added support in 5.6 to support microseconds for datetime field. https://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html
      • Service will take [groupName] as in param,
      • iterate all the entity and check for datetime and time field
      • it will generate alter table sql statement to update the field data type
      • datetime will be altered with DATETIME(3)
      • time will be altered with TIME(3)
      • sql fiel will be created at following location
      • ${ofbiz.home}/runtime/tempfiles/[groupName].sql
      Parameters:
      dctx -
      context -
      Returns:
      Map with the success result of the service,