From e3cf2256b81eeb25d2b48112b9087e6a3dbf9100 Mon Sep 17 00:00:00 2001 From: asbarve Date: Mon, 16 Oct 2017 10:47:52 -0400 Subject: [PATCH 1/6] opened new version for development --- CHANGELOG.md | 2 ++ package.json | 2 +- schema/cognicity/cognicity.functions.sql | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46a8129..682ce84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,3 +7,5 @@ CHANGE LOG - added data for Mumbai and Bangalore - added test support for multiple instances per deployment - added tests for Surabaya and Bandung + +## v3.0.5 diff --git a/package.json b/package.json index 2176d49..622f76c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cognicity-schema", - "version": "3.0.4", + "version": "3.0.5", "description": "Cognicity Database Schema", "engines": { "node": ">=8.1.4" diff --git a/schema/cognicity/cognicity.functions.sql b/schema/cognicity/cognicity.functions.sql index fe7eaea..168a081 100644 --- a/schema/cognicity/cognicity.functions.sql +++ b/schema/cognicity/cognicity.functions.sql @@ -112,7 +112,7 @@ CREATE FUNCTION cognicity.version() RETURNS varchar AS $BODY$ BEGIN - RETURN '3.0.4'; + RETURN '3.0.5'; END $BODY$ LANGUAGE plpgsql VOLATILE From 1ca68758d752d777f7e9333c5ffba3afe096e2b0 Mon Sep 17 00:00:00 2001 From: Tomas Date: Thu, 7 Dec 2017 10:18:56 -0500 Subject: [PATCH 2/6] added Semarang --- data/indonesia/cognicity/instance_regions.data.sql | 5 +++-- test/index.js | 12 ++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/data/indonesia/cognicity/instance_regions.data.sql b/data/indonesia/cognicity/instance_regions.data.sql index 7dfd10b..b252f51 100644 --- a/data/indonesia/cognicity/instance_regions.data.sql +++ b/data/indonesia/cognicity/instance_regions.data.sql @@ -1,5 +1,6 @@ --- Instance regions for PetaBencana.id 2016 +-- Instance regions for PetaBencana.id 2017 -- Refer to https://github.com/urbanriskmap/urbanriskmap-meta/wiki/Bounding-Boxes-for-Target-Cities INSERT INTO cognicity.instance_regions (code, name, the_geom) VALUES ('jbd', 'Jabodetabek', ST_GeomFromText('POLYGON((106.480 -6.733, 107.175 -6.733, 107.175 -5.880, 106.480 -5.880, 106.480 -6.733))',4326)), ('bdg', 'Bandung', ST_GeomFromText('POLYGON((107.369 -7.165, 107.931 -7.165, 107.931 -6.668, 107.369 -6.668, 107.369 -7.165))',4326)), -('sby', 'Surabaya', ST_GeomFromText('POLYGON((112.3975 -7.5499, 113.0318 -7.5499, 113.0318 -7.0143, 112.3975 -7.0143, 112.3975 -7.5499))',4326)); +('sby', 'Surabaya', ST_GeomFromText('POLYGON((112.3975 -7.5499, 113.0318 -7.5499, 113.0318 -7.0143, 112.3975 -7.0143, 112.3975 -7.5499))',4326)), +('srg', 'Semarang', ST_GeomFromText('POLYGON((110.057 -7.33525, 110.715 -7.33525, 110.715 -6.72701, 110.057 -6.72701, 110.057 -7.33525))',4326)); diff --git a/test/index.js b/test/index.js index 7b3c193..2eeda31 100644 --- a/test/index.js +++ b/test/index.js @@ -59,6 +59,18 @@ let deployments = { 'test_card_url': 'abcdefg', 'test_card_data': {'water_depth': '100'}, }, + { + 'name': 'Semarang', + 'test_instance_region_code': 'srg', + 'test_local_area_id': 'null', + 'test_report_lat': -7.1141, + 'test_report_lon': 110.3850, + 'test_report_text': 'report text', + 'test_report_lang': 'en', + 'test_report_url': 'no_url', + 'test_card_url': 'abcdefg', + 'test_card_data': {'water_depth': '100'}, + }, ], }, From e585707680c5b784006fda21ea972a33cb603739 Mon Sep 17 00:00:00 2001 From: Tomas Date: Thu, 7 Dec 2017 10:26:23 -0500 Subject: [PATCH 3/6] updated package-lock.json --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 9d66568..9e4b2a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cognicity-schema", - "version": "3.0.4", + "version": "3.0.5", "lockfileVersion": 1, "dependencies": { "acorn": { From 8b3388a884096739a39f9e90a744294ab2165806 Mon Sep 17 00:00:00 2001 From: Tomas Date: Thu, 7 Dec 2017 11:22:31 -0500 Subject: [PATCH 4/6] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 682ce84..a42430d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,3 +9,4 @@ CHANGE LOG - added tests for Surabaya and Bandung ## v3.0.5 +- added Semarang extents to Indonesian data From 06802bf2d2799267ab5f396be3eebb8743c003b4 Mon Sep 17 00:00:00 2001 From: Tomas Date: Wed, 13 Dec 2017 11:29:42 -0500 Subject: [PATCH 5/6] removed connection limit --- build/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/run.sh b/build/run.sh index b267f9e..5d7516c 100755 --- a/build/run.sh +++ b/build/run.sh @@ -15,7 +15,7 @@ if [ $SCHEMA == true ]; then # Create Database # Build command echo "Create database" - BUILD="CREATE DATABASE \"$PGDATABASE\" WITH OWNER = \"$PGUSER\" ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8' CONNECTION LIMIT = -1;" + BUILD="CREATE DATABASE \"$PGDATABASE\" WITH OWNER = \"$PGUSER\" ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';" psql -h $PGHOST -p $PGPORT -U $PGUSER -d $PG_DEFAULT_DB -c """$BUILD""" From 875521af7a39a559f01e9dbc89b4f88edd208c12 Mon Sep 17 00:00:00 2001 From: Tomas Date: Wed, 13 Dec 2017 11:49:45 -0500 Subject: [PATCH 6/6] updated build parameters --- CHANGELOG.md | 2 ++ build/run.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a42430d..06193e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,3 +10,5 @@ CHANGE LOG ## v3.0.5 - added Semarang extents to Indonesian data +- added test instance parameters for Semarang +- removed default parameters from database build script diff --git a/build/run.sh b/build/run.sh index 5d7516c..7ce2a87 100755 --- a/build/run.sh +++ b/build/run.sh @@ -15,7 +15,7 @@ if [ $SCHEMA == true ]; then # Create Database # Build command echo "Create database" - BUILD="CREATE DATABASE \"$PGDATABASE\" WITH OWNER = \"$PGUSER\" ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';" + BUILD="CREATE DATABASE \"$PGDATABASE\" WITH OWNER = \"$PGUSER\" ENCODING = 'UTF8';" psql -h $PGHOST -p $PGPORT -U $PGUSER -d $PG_DEFAULT_DB -c """$BUILD"""