[ https://issues.apache.org/jira/browse/OFBIZ-5503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sharan Foga updated OFBIZ-5503: ------------------------------- Sprint: Bug Crush Event - 21/2/2015 > New not-null/pk columns created nullable > ---------------------------------------- > > Key: OFBIZ-5503 > URL: https://issues.apache.org/jira/browse/OFBIZ-5503 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Trunk > Reporter: Simone Viani > > Newly not-nullable or pk fields are always created as nullable columns > in the database, they are correctly created only with new tables. > See differences in: > {code} > org.ofbiz.entity.jdbc.DatabaseUtil.createTable(ModelEntity, Map<String, > ModelEntity>, boolean) > org.ofbiz.entity.jdbc.DatabaseUtil.addColumn(ModelEntity, ModelField) > {code} > Method addColumn is missing the following: > {code} > if (field.getIsNotNull() || field.getIsPk()) { ... } > {code} > I think it's worth to try creating a not-null column with default value at > least when resizing: > {code} > org.ofbiz.entity.jdbc.DatabaseUtil.repairColumnSize(ModelEntity, ModelField, > List<String>) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)