UPDATE: Entity, Geo, Wiki
All checks were successful
Build and Release / release (push) Successful in 1m10s
All checks were successful
Build and Release / release (push) Successful in 1m10s
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
CREATE EXTENSION IF NOT EXISTS btree_gist;
|
||||
CREATE EXTENSION IF NOT EXISTS postgis;
|
||||
|
||||
@@ -8,7 +9,7 @@ CREATE TABLE IF NOT EXISTS geometries (
|
||||
binding JSONB,
|
||||
time_start INT,
|
||||
time_end INT,
|
||||
bbox GEOMETRY,
|
||||
bbox GEOMETRY(Polygon, 4326),
|
||||
is_deleted BOOLEAN NOT NULL DEFAULT false,
|
||||
created_at TIMESTAMPTZ DEFAULT now(),
|
||||
updated_at TIMESTAMPTZ DEFAULT now()
|
||||
@@ -24,6 +25,13 @@ CREATE TABLE IF NOT EXISTS entity_geometries (
|
||||
PRIMARY KEY (entity_id, geometry_id)
|
||||
);
|
||||
|
||||
DROP INDEX IF EXISTS idx_geom_draw_geometry;
|
||||
DROP INDEX IF EXISTS idx_geom_bbox;
|
||||
DROP INDEX IF EXISTS idx_geom_time_range;
|
||||
DROP INDEX IF EXISTS idx_entity_geometries_geometry;
|
||||
DROP INDEX IF EXISTS idx_geom_binding;
|
||||
DROP INDEX IF EXISTS idx_geom_updated_at;
|
||||
|
||||
CREATE INDEX idx_geom_draw_geometry
|
||||
ON geometries USING GIN (draw_geometry);
|
||||
|
||||
@@ -45,6 +53,7 @@ CREATE INDEX idx_geom_updated_at
|
||||
ON geometries (updated_at DESC)
|
||||
WHERE is_deleted = false;
|
||||
|
||||
DROP TRIGGER IF EXISTS trigger_geometries_updated_at ON geometries;
|
||||
CREATE TRIGGER trigger_geometries_updated_at
|
||||
BEFORE UPDATE ON geometries
|
||||
FOR EACH ROW
|
||||
|
||||
Reference in New Issue
Block a user