Setting up an app with SQL - kwantu/platformconfiguration GitHub Wiki
-
Create a new database for the app
-
Add a new row in the
community_hubstable located in the mobile1_8 database with the database name and the hub communityId.

- Add a new row (if not already present) in the
etl_types_appid_mappingtable located in the mobile1_8 database containingetl_type = 'mysqlSubprocess'and the appId.

- Ensure all data objects for the app contains an sql tag as shown on this page here

- Update
etl_appcodesto have anapp_file_precode(this must match the precode used in thetable_nameinside the data object<sql/>tag that looks like thistableName="PROJ_localAuthSiteReport". Here 'PROJ' is the precode).

-
Run the service
/db/kwantu-resource/etl/couchdbToMySQL/populate_community_to_hubs_mapping.xql. This will update theetl_communityid_appid_mappingtable so that it contains all communities that insidecommunity_hubs. -
Run the service
/db/kwantu-resource/etl/couchdbToMySQL/prepareTables.xqlwith the correctappId,communityIdandappCode. (If this fails then the most likely issue is with dataTypes being missing) -
Now update the
etl_controltable with a new row for each community (You can use the/db/kwantu-resource/etl/couchdbToMySQL/insertEtl.xqservice to do this automatically by updating the parameters for the$hubCommunityIdand$childrenTitle. The value of this variable should be the one highlighted yellow in the picture below.)

Now the etl should start processing