Setting up an app with SQL - kwantu/platformconfiguration GitHub Wiki

Steps:

  1. Create a new database for the app

  2. Add a new row in the community_hubs table located in the mobile1_8 database with the database name and the hub communityId.

image

  1. Add a new row (if not already present) in the etl_types_appid_mapping table located in the mobile1_8 database containing etl_type = 'mysqlSubprocess' and the appId.

image

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

image

  1. Update etl_appcodes to have an app_file_precode (this must match the precode used in the table_name inside the data object <sql/> tag that looks like this tableName="PROJ_localAuthSiteReport". Here 'PROJ' is the precode).

image

  1. Run the service /db/kwantu-resource/etl/couchdbToMySQL/populate_community_to_hubs_mapping.xql. This will update the etl_communityid_appid_mapping table so that it contains all communities that inside community_hubs.

  2. Run the service /db/kwantu-resource/etl/couchdbToMySQL/prepareTables.xql with the correct appId, communityId and appCode. (If this fails then the most likely issue is with dataTypes being missing)

  3. Now update the etl_control table with a new row for each community (You can use the /db/kwantu-resource/etl/couchdbToMySQL/insertEtl.xq service to do this automatically by updating the parameters for the $hubCommunityId and $childrenTitle. The value of this variable should be the one highlighted yellow in the picture below.)

image

Now the etl should start processing

⚠️ **GitHub.com Fallback** ⚠️