Migration scripts for client

This commit is contained in:
manmorjim 2020-03-17 11:20:47 +01:00
parent b7c9ff8dac
commit 24df64681d
2 changed files with 17 additions and 0 deletions

View File

@ -6,3 +6,14 @@
SET search_path = "$user",cartodb,public,cdb_dataservices_client;
-- HERE goes your code to upgrade/downgrade
-- PG12_DEPRECATED
-- Create geomval if it doesn't exist (in postgis 3+ it only exists in postgis_raster)
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'geomval') THEN
CREATE TYPE cdb_dataservices_client.geomval AS (
geom geometry,
val double precision
);
END IF;
END$$;

View File

@ -6,3 +6,9 @@
SET search_path = "$user",cartodb,public,cdb_dataservices_client;
-- HERE goes your code to upgrade/downgrade
-- PG12_DEPRECATED
-- Create geomval if it doesn't exist (in postgis 3+ it only exists in postgis_raster)
DO $$
BEGIN
DROP TYPE IF EXISTS cdb_dataservices_client.geomval RESTRICT;
END$$;