Details
-
Feature Request
-
Status: Completed
-
Resolution: Implemented in Platform
-
7.0.0 CE GA1, 7.0.1 CE GA2
-
None
-
None
Description
The first time you run the deployment of a module that uses the service builder, running the SQL code is successful (tables, indexes, sequence, etc ...).
10:00:31,774 INFO [Refresh Thread: Equinox Container: 50e75200-6064-0016-15e9-9805fef927f8][ServiceComponentLocalServiceImpl:317] Running LRBO_HORSE SQL scripts
For example, when I add a new column (service.xml) and re-run the deployment after running the buildservice, the SQL code is not executed and therefore the new column is not added to the table.
Although upgrade had changed in Liferay 7 as stated in Developer Network (Upgrade Process in Liferay 7link title), developers from previous versions can find this unefficient, mostly in development phases.
Only during the development phase. If you want to apply the new changes then you should perform the following SQL operations on the database:
- drop table relating to the service;
- delete record on the release_ table which are related to the service;
- delete record on the servicecomponent table which are related to the service;
Following an example of SQL statements to be executed for a custom service:
DROP TABLE LRBO_HORSE_HORSE; DELETE FROM SERVICECOMPONENT WHERE BUILDNAMESPACE = 'LRBO_HORSE'; DELETE FROM RELEASE_ WHERE SERVLETCONTEXTNAME = 'horse-service';
Once executed SQL statements deploy the service again. You'll notice again on Liferay log the entry "Running SQL scripts $SERVICENAMESPACE"
It would be great to implement a "developer" mode so at least those new columns are added automatically.
Attachments
Issue Links
- relates
-
LPS-73967 Build auto upgrade
-
- Closed
-
-
LRDOCS-3914 Document the cleanServiceBuilder task
-
- Closed
-
-
LPS-72012 Add a "developer mode" that doesn't require you to upgrade your database for each change
-
- Won't Do
-