RE: How to disable service builder auto upgrade in liferay 7.2?

Swetha Sree, modified 5 Years ago. New Member Post: 1 Join Date: 6/19/20 Recent Posts
We have recently updated our service builder modules from 6.2 to 7.2.In liferay 6.2 version we were setting build.number=1 and build.auto.upgrade=false in service-ext.properties so that tables will not be updated on deployment of a service builder module.In the upgraded environment, services are not getting registered immediately after the deployment so we used bundleActivator and dummyUpgrade steps to register those services with liferay.  We are setting build.number=1 in service-ext properties to not to update the table structure on next deployments.Before the initial deployment we are emptying the generated .sql files  so that table structure will not be altered. 
https://help.liferay.com/hc/en-us/articles/360017883712-Upgrading-Data-Schemas-in-Development
The above link statesBy default, 
schema.module.build.auto.upgrade
 is set to 
false
. On any module’s first deployment, the module’s tables are generated regardless of the 
schema.module.build.auto.upgrade
 value.So is there better approach than emptying the generated .sql files content before deployment to retain table structure and data as it is? Please suggest. Thanks in advance.
thumbnail
Alberto Chaparro Terleira, modified 5 Years ago. Liferay Master Posts: 560 Join Date: 4/25/11 Recent Posts
Hi Swetha,
Probably you need to do this:https://help.liferay.com/hc/en-us/articles/360018168951-Upgrade-Processes-for-Former-Service-Builder-Plugins

If you had a service builder plugin in 6.2 and you migrated to OSGi you need to tell Liferay 7.2 that that module was previously installed to avoid generate the tables again. That guide is for that.
I hope it helps