Package org.apache.ofbiz.entityext.data
Class UpgradeServices
- java.lang.Object
-
- org.apache.ofbiz.entityext.data.UpgradeServices
-
public class UpgradeServices extends java.lang.Object
Entity Data Upgrade Services
-
-
Constructor Summary
Constructors Constructor Description UpgradeServices()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.Object>
generateMySqlFileWithAlterTableForTimestamps(DispatchContext dctx, java.util.Map<java.lang.String,java.lang.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.
-
-
-
Field Detail
-
module
public static final java.lang.String module
-
resource
public static final java.lang.String resource
- See Also:
- Constant Field Values
-
-
Method Detail
-
generateMySqlFileWithAlterTableForTimestamps
public static java.util.Map<java.lang.String,java.lang.Object> generateMySqlFileWithAlterTableForTimestamps(DispatchContext dctx, java.util.Map<java.lang.String,java.lang.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,
-
-