UPDATE: fix bug
All checks were successful
Build and Release / release (push) Successful in 1m13s

This commit is contained in:
2026-05-04 21:20:47 +07:00
parent 4817c29b8f
commit 1998cf2ec0
14 changed files with 101 additions and 35 deletions

View File

@@ -5,6 +5,8 @@ CREATE TABLE IF NOT EXISTS entities (
slug TEXT,
description TEXT,
status SMALLINT,
time_start INT,
time_end INT,
is_deleted BOOLEAN NOT NULL DEFAULT false,
created_at TIMESTAMPTZ DEFAULT now(),
updated_at TIMESTAMPTZ DEFAULT now()
@@ -16,6 +18,10 @@ ON entities USING GIN (name gin_trgm_ops);
CREATE INDEX idx_entities_project_id ON entities(project_id);
CREATE INDEX idx_entities_time_range
ON entities USING GIST (int4range(time_start, time_end, '[]'))
WHERE is_deleted = false;
CREATE INDEX idx_entities_created_active
ON entities(created_at DESC)
WHERE is_deleted = false;

View File

@@ -34,7 +34,7 @@ ON geometries USING GIST (bbox)
WHERE is_deleted = false;
CREATE INDEX idx_geom_time_range
ON geometries USING GIST (int4range(time_start, time_end))
ON geometries USING GIST (int4range(time_start, time_end, '[]'))
WHERE is_deleted = false;
CREATE INDEX idx_entity_geometries_geometry