# HG changeset patch # User Sascha Wilde # Date 1547631382 -3600 # Node ID 99cf6da4c8c04850d1699b26ac192f218bc4989b # Parent 518cea19f6b4e83e714785009da7427373eb6a6f Removed all unique geohash indexes as they prevent updates of data. What ever the intension of these indexes were, in the given form they are wrong and prevent updating of data in an area, where old data already exists. diff -r 518cea19f6b4 -r 99cf6da4c8c0 schema/gemma.sql --- a/schema/gemma.sql Wed Jan 16 10:20:11 2019 +0100 +++ b/schema/gemma.sql Wed Jan 16 10:36:22 2019 +0100 @@ -234,7 +234,6 @@ catccl smallint REFERENCES catccls, dirimp smallint REFERENCES dirimps ) - CREATE UNIQUE INDEX ON waterway_area ((ST_GeoHash(area, 23))) CREATE TABLE gauges ( location isrs PRIMARY KEY CHECK( @@ -300,8 +299,6 @@ objnam varchar NOT NULL, nobjnam varchar ) - -- TODO: @tom: Why did you choose this index kind? - -- CREATE UNIQUE INDEX ON waterway_axis ((ST_GeoHash(wtwaxs, 23))) -- This table allows linkage between 1D ISRS location codes and 2D space -- e.g. for cutting bottleneck area out of waterway area based on virtual @@ -396,7 +393,6 @@ source_organization varchar NOT NULL, staging_done boolean NOT NULL DEFAULT false ) - CREATE UNIQUE INDEX ON fairway_dimensions ((ST_GeoHash(area, 23))) CREATE TRIGGER fairway_dimensions_date_info BEFORE UPDATE ON fairway_dimensions FOR EACH ROW EXECUTE PROCEDURE update_date_info()