This repository has been archived by the owner on Jan 21, 2021. It is now read-only.
forked from SEL-Columbia/dristhi
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
165 changed files
with
14,783 additions
and
3,156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
#this file is used by motech | ||
host=localhost | ||
port=5984 | ||
maxConnections=20 | ||
connectionTimeout=1000 | ||
socketTimeout=10000 | ||
username=rootuser | ||
password=adminpass | ||
password=adminpass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#this file is used by motech | ||
schedule.definitions.directory=/schedules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
assets/migrations/scripts/20180423065110_create_view_configurations_table.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
-- | ||
-- Copyright 2010-2016 the original author or authors. | ||
-- | ||
-- Licensed under the Apache License, Version 2.0 (the "License"); | ||
-- you may not use this file except in compliance with the License. | ||
-- You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, software | ||
-- distributed under the License is distributed on an "AS IS" BASIS, | ||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
-- | ||
|
||
-- // create view configurations table | ||
-- Migration SQL that makes the change goes here. | ||
CREATE TABLE core.view_configuration | ||
( | ||
id bigserial NOT NULL, | ||
json jsonb NOT NULL, | ||
PRIMARY KEY (id) | ||
) | ||
WITH ( | ||
OIDS = FALSE | ||
) | ||
|
||
|
||
-- //@UNDO | ||
-- SQL to undo the change goes here. | ||
DROP TABLE core.view_configuration | ||
|
36 changes: 36 additions & 0 deletions
36
assets/migrations/scripts/20180423072606_create_view_configurations_metadata_table.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
-- | ||
-- Copyright 2010-2016 the original author or authors. | ||
-- | ||
-- Licensed under the Apache License, Version 2.0 (the "License"); | ||
-- you may not use this file except in compliance with the License. | ||
-- You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, software | ||
-- distributed under the License is distributed on an "AS IS" BASIS, | ||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
-- | ||
|
||
-- // create view configurations metadata table | ||
-- Migration SQL that makes the change goes here. | ||
|
||
CREATE TABLE core.view_configuration_metadata | ||
( | ||
id bigserial NOT NULL, | ||
view_configuration_id bigint REFERENCES core.view_configuration (id), | ||
document_id character varying UNIQUE NOT NULL, | ||
identifier varchar UNIQUE, | ||
server_version bigint, | ||
PRIMARY KEY (id) | ||
) | ||
WITH ( | ||
OIDS = FALSE | ||
); | ||
|
||
-- //@UNDO | ||
-- SQL to undo the change goes here. | ||
DROP TABLE core.view_configuration_metadata; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
This folder contains the default view configuration json files as deployed with this Release Version of TB Reach as well as the Shell Script to populate the db with them. | ||
|
||
The script works with both postgres and couchdb. | ||
|
||
For couchDb | ||
Make sure you have set up couch database on this machine and that couch is accessible via port 5894 (You can modify the script if you use a different port) | ||
Run the command below: | ||
|
||
./setup_view_configs.sh -d <database name> (e.g. ./setup_view_configs.sh -d opensrp_tbreach) | ||
|
||
For Postgres | ||
|
||
You must specify the parameter -t with value postgres. The default is couchdb | ||
Make sure you have set up postgres database on this machine and that postgres is accessible via port 5432 (You can modify the script if you use a different port) | ||
Run the command below: | ||
|
||
./setup_view_configs.sh -t postgres -u <postgres_user> -pwd <postgres _user_password> -d opensrp -d <database name> (e.g. ./setup_view_configs.sh -t postgres -u opensrp_admin -pwd admin -d opensrp_tbreach) | ||
|
||
Run ./setup_view_configs.sh --help to get a list of available options | ||
|
||
Specify (Optional) database type like ./setup_view_configs.sh -t postgres | ||
|
||
Specify (Optional) a database name like ./setup_view_configs.sh -d <database name> | ||
|
||
Specify (Optional) a host like ./setup_view_configs.sh -h <hostname> | ||
|
||
Specify (Optional) a port name like ./setup_view_configs.sh -p <port> | ||
|
||
Specify (Optional) a source folder like ./setup_view_configs.sh -f <folder path> | ||
|
||
Specify (Optional) a username like ./setup_view_configs.sh -u <username> | ||
|
||
Specify (Optional) a password like ./setup_view_configs.sh -pwd <password> | ||
|
||
Specify (Optional) a protocol e.g. http or https like ./setup_view_configs.sh -proto <protocol> | ||
|
||
Specify (Optional) any multiple arguments like ./setup_view_configs.sh -u <username> -pwd <password> -d <database name> | ||
|
||
For Authentication you can choose to pass the username and password as part of the host e.g. ./setup_view_configs.sh -h http://<username>:<password>@<hostname> | ||
|
||
Happy Coding :) | ||
|
Oops, something went wrong.