4.0.0: Исправлена обработка старых дампов
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m19s

This commit is contained in:
poignatov
2026-01-25 16:41:50 +03:00
parent b8ef59bfd1
commit 90643c504a
42 changed files with 2052 additions and 1157 deletions

View File

@@ -0,0 +1,14 @@
-- Migration: Optimize task queries with composite index
-- Date: 2026-01-24
--
-- This migration adds a composite index to optimize the task detail query:
-- WHERE id = $1 AND user_id = $2 AND deleted = FALSE
--
-- The index uses a partial index with WHERE deleted = FALSE to reduce index size
-- and improve query performance for active (non-deleted) tasks.
CREATE INDEX IF NOT EXISTS idx_tasks_id_user_deleted
ON tasks(id, user_id, deleted)
WHERE deleted = FALSE;
COMMENT ON INDEX idx_tasks_id_user_deleted IS 'Composite index for optimizing task detail queries with id, user_id, and deleted filter. Partial index for non-deleted tasks only.';