Skip to content

Commit

Permalink
Merge pull request #46 from jjrom/develop
Browse files Browse the repository at this point in the history
Upgrade to PHP 8.0
  • Loading branch information
jjrom authored Aug 26, 2021
2 parents 63f2a51 + 7544107 commit 52dd542
Show file tree
Hide file tree
Showing 18 changed files with 375 additions and 430 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,3 @@ When deployed, all configurations file are stored under .run/config directory

### Why do i have empty result for landcover and population ?
The Landcover and Population data are available separately from this repository. If you need this data, send an email to [email protected]

2 changes: 1 addition & 1 deletion app/include/iTag/iTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class iTag
* )
* )
*/
const VERSION = '5.1.5';
const VERSION = '5.2.0';

/*
* Character separator
Expand Down
2 changes: 1 addition & 1 deletion build/itag-database/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mdillon/postgis:11-alpine
FROM postgis/postgis:13-3.1-alpine
LABEL maintainer="[email protected]"

ENV BUILD_DIR=./build/itag-database \
Expand Down
8 changes: 4 additions & 4 deletions build/itag-database/installDB.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ err_report() {
}
trap 'err_report $LINENO' ERR

PGPASSWORD=${POSTGRES_PASSWORD} psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" -f /sql/00_itag_extensions.sql > /dev/null 2>&1
PGPASSWORD=${POSTGRES_PASSWORD} psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" -f /sql/01_itag_functions.sql > /dev/null 2>&1
PGPASSWORD=${POSTGRES_PASSWORD} psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" -f /sql/01_tamn.sql > /dev/null 2>&1
PGPASSWORD=${POSTGRES_PASSWORD} psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" -f /sql/02_itag_model.sql > /dev/null 2>&1
PGPASSWORD=${POSTGRES_PASSWORD} psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" -f /sql/00_itag_extensions.sql
PGPASSWORD=${POSTGRES_PASSWORD} psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" -f /sql/01_itag_functions.sql
PGPASSWORD=${POSTGRES_PASSWORD} psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" -f /sql/01_tamn.sql
PGPASSWORD=${POSTGRES_PASSWORD} psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" -f /sql/02_itag_model.sql

16 changes: 8 additions & 8 deletions build/itag-database/sql/01_itag_functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@
--
-- Create IMMUTABLE unaccent function
--
CREATE OR REPLACE FUNCTION public.f_unaccent(text) RETURNS text AS
$func$
SELECT public.unaccent('public.unaccent', $1) -- schema-qualify function and dictionary
$func$ LANGUAGE sql IMMUTABLE;
CREATE OR REPLACE FUNCTION public.f_unaccent(text)
RETURNS TEXT AS $$
SELECT public.unaccent('public.unaccent', $1) -- schema-qualify function and dictionary
$$ LANGUAGE sql IMMUTABLE;

--
-- Return a transliterated version of input string in lowercase
--
CREATE OR REPLACE FUNCTION normalize(input TEXT, separator text DEFAULT '')
RETURNS TEXT AS $$
CREATE OR REPLACE FUNCTION public.normalize(input text, separator text DEFAULT '')
RETURNS text AS $$
BEGIN
RETURN translate(lower(public.f_unaccent(input)), ' '',:-\`\´\‘\_' , separator);
RETURN translate(lower(public.f_unaccent(input)), ' '',:-`´‘’_' , separator);
END
$$ LANGUAGE 'plpgsql' IMMUTABLE;

--
-- Return a transliterated version of input string which the first letter of each word
-- is in uppercase and the remaining characters in lowercase
--
CREATE OR REPLACE FUNCTION normalize_initcap(input TEXT, separator text DEFAULT '')
CREATE OR REPLACE FUNCTION public.normalize_initcap(input TEXT, separator text DEFAULT '')
RETURNS TEXT AS $$
BEGIN
RETURN translate(initcap(public.f_unaccent(input)), ' '',:-\`\´\‘\’_' , separator);
Expand Down
Loading

0 comments on commit 52dd542

Please sign in to comment.