diff --git a/server/extension/cdb_dataservices_server--0.18.0--0.18.1.sql b/server/extension/cdb_dataservices_server--0.18.0--0.18.1.sql index d21e33c..67b2e24 100644 --- a/server/extension/cdb_dataservices_server--0.18.0--0.18.1.sql +++ b/server/extension/cdb_dataservices_server--0.18.0--0.18.1.sql @@ -2,4 +2,11 @@ -- Complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "ALTER EXTENSION cdb_dataservices_server UPDATE TO '0.18.1'" to load this file. \quit --- HERE goes your code to upgrade/downgrade \ No newline at end of file +-- HERE goes your code to upgrade/downgrade +ALTER TYPE cdb_dataservices_server.obs_meta_geometry ADD ATTRIBUTE score numeric; +ALTER TYPE cdb_dataservices_server.obs_meta_geometry ADD ATTRIBUTE numtiles bigint; +ALTER TYPE cdb_dataservices_server.obs_meta_geometry ADD ATTRIBUTE notnull_percent numeric; +ALTER TYPE cdb_dataservices_server.obs_meta_geometry ADD ATTRIBUTE numgeoms numeric; +ALTER TYPE cdb_dataservices_server.obs_meta_geometry ADD ATTRIBUTE percentfill numeric; +ALTER TYPE cdb_dataservices_server.obs_meta_geometry ADD ATTRIBUTE estnumgeoms numeric; +ALTER TYPE cdb_dataservices_server.obs_meta_geometry ADD ATTRIBUTE meanmediansize numeric; diff --git a/server/extension/cdb_dataservices_server--0.18.1--0.18.0.sql b/server/extension/cdb_dataservices_server--0.18.1--0.18.0.sql index cc7ce4b..5f21a8a 100644 --- a/server/extension/cdb_dataservices_server--0.18.1--0.18.0.sql +++ b/server/extension/cdb_dataservices_server--0.18.1--0.18.0.sql @@ -2,4 +2,11 @@ -- Complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "ALTER EXTENSION cdb_dataservices_server UPDATE TO '0.18.0'" to load this file. \quit --- HERE goes your code to upgrade/downgrade \ No newline at end of file +-- HERE goes your code to upgrade/downgrade +ALTER TYPE cdb_dataservices_server.obs_meta_geometry DROP ATTRIBUTE score; +ALTER TYPE cdb_dataservices_server.obs_meta_geometry DROP ATTRIBUTE numtiles; +ALTER TYPE cdb_dataservices_server.obs_meta_geometry DROP ATTRIBUTE notnull_percent; +ALTER TYPE cdb_dataservices_server.obs_meta_geometry DROP ATTRIBUTE numgeoms; +ALTER TYPE cdb_dataservices_server.obs_meta_geometry DROP ATTRIBUTE percentfill; +ALTER TYPE cdb_dataservices_server.obs_meta_geometry DROP ATTRIBUTE estnumgeoms; +ALTER TYPE cdb_dataservices_server.obs_meta_geometry DROP ATTRIBUTE meanmediansize; diff --git a/server/extension/sql/130_data_observatory_helper.sql b/server/extension/sql/130_data_observatory_helper.sql index 384547e..b75563a 100644 --- a/server/extension/sql/130_data_observatory_helper.sql +++ b/server/extension/sql/130_data_observatory_helper.sql @@ -35,7 +35,7 @@ RETURNS SETOF cdb_dataservices_server.obs_meta_denominator AS $$ SELECT * FROM cdb_observatory.OBS_GetAvailableDenominators(bounds, filter_tags, numer_id, geom_id, timespan); $$ LANGUAGE plproxy; -CREATE TYPE cdb_dataservices_server.obs_meta_geometry AS (geom_id text, geom_name text, geom_description text, geom_weight text, geom_aggregate text, geom_license text, geom_source text, valid_numer boolean, valid_denom boolean, valid_timespan boolean); +CREATE TYPE cdb_dataservices_server.obs_meta_geometry AS (geom_id text, geom_name text, geom_description text, geom_weight text, geom_aggregate text, geom_license text, geom_source text, valid_numer boolean, valid_denom boolean, valid_timespan boolean, score numeric, numtiles bigint, notnull_percent numeric, numgeoms numeric, percentfill numeric, estnumgeoms numeric, meanmediansize numeric); CREATE OR REPLACE FUNCTION cdb_dataservices_server.OBS_GetAvailableGeometries( username TEXT,