mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 21:12:09 +03:00
d9fa299750
The setup in several tests was using `ST_GeomFromText`, which expects data in the OGC WKT format, but was providing the SRID in the text itself, which is part of the EWKT format. The fix was simply to replace all calls to `ST_GeomFromText` to `ST_GeomFromEWKT`.
29 lines
769 B
YAML
29 lines
769 B
YAML
type: bulk
|
|
args:
|
|
|
|
#Create required extensions, tables and insert test data
|
|
- type: run_sql
|
|
args:
|
|
sql: |
|
|
CREATE EXTENSION IF NOT EXISTS postgis;
|
|
CREATE EXTENSION IF NOT EXISTS postgis_topology;
|
|
DO $$
|
|
BEGIN
|
|
IF PostGIS_lib_version() ~ '^3.*' THEN
|
|
CREATE EXTENSION IF NOT EXISTS postgis_raster;
|
|
END IF;
|
|
END$$;
|
|
|
|
CREATE TABLE dummy_rast(
|
|
rid serial primary key,
|
|
rast raster
|
|
);
|
|
INSERT INTO dummy_rast (rast) values
|
|
(ST_AsRaster(ST_Buffer(ST_GeomFromEWKT('SRID=4326;POINT(1 2)'),2), 5, 5))
|
|
, (ST_AsRaster(ST_Buffer(ST_GeomFromEWKT('SRID=4326;LINESTRING(0 0, 0.5 1, 1 2, 1.5 3)'), 2), 5, 5))
|
|
;
|
|
- type: track_table
|
|
args:
|
|
name: dummy_rast
|
|
schema: public
|