Skip to content

Commit

Permalink
Merge pull request #41 from urbanriskmap/dev
Browse files Browse the repository at this point in the history
Merge dev to form v3.0.5
  • Loading branch information
tomasholderness authored Dec 13, 2017
2 parents fde392b + 875521a commit 15cd8ff
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ 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
- added Semarang extents to Indonesian data
- added test instance parameters for Semarang
- removed default parameters from database build script
2 changes: 1 addition & 1 deletion build/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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';"

psql -h $PGHOST -p $PGPORT -U $PGUSER -d $PG_DEFAULT_DB -c """$BUILD"""

Expand Down
5 changes: 3 additions & 2 deletions data/indonesia/cognicity/instance_regions.data.sql
Original file line number Diff line number Diff line change
@@ -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));
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cognicity-schema",
"version": "3.0.4",
"version": "3.0.5",
"description": "Cognicity Database Schema",
"engines": {
"node": ">=8.1.4"
Expand Down
2 changes: 1 addition & 1 deletion schema/cognicity/cognicity.functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
},
],
},

Expand Down

0 comments on commit 15cd8ff

Please sign in to comment.