liferayliferay-7liferay-service-builder

liferay service builder clean and rebuild


I have a service builder module whose table definitions need to be changed. In my case I've modified the portlet-model-hints.xml file in the service's /src/main/resources directory to increase the length of a String field from 75 to a higher number. When I run blade gw cleanServiceBuilder, the old tables are dropped. When I then run blade gw buildService and then deploy the module with blade deploy, the new sql scripts are not executed (or something similar -- I can't find the new tables in my database). Has anyone else had this problem?


Solution

  • It can be fixed by manually deleting some rows in the servicecomponent and release_ tables. In particular, after cleaning the service builder, the servicecomponent table will still have a row with the service's buildNamespace and buildNumber. In the release_ there will be a row with servletContextName and schemaVersion of the module in question. These two rows can be deleted by hand and the next deploy will create the new tables.