- Extract useCustomStepFlow hook from TreeNavigationPage (1040 → 759 lines) - Create core/filters.py with shared tree/step visibility filters - Create services/export_service.py from session export logic - Add GitHub Actions CI/CD pipeline (pytest + lint + build) - Add GIN index migration for full-text search on trees - Update FastAPI 0.128.5, Pydantic 2.12.5, SQLAlchemy 2.0.46, +5 more - Fix regex → pattern deprecation in Query() params Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
33 lines
809 B
Python
33 lines
809 B
Python
"""add full-text search GIN index on trees
|
|
|
|
Revision ID: 027
|
|
Revises: 026
|
|
Create Date: 2026-02-08
|
|
|
|
Adds a GIN index for full-text search on the trees table,
|
|
indexing the name and description columns using English text search.
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = '027'
|
|
down_revision: Union[str, None] = '026'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.execute(
|
|
"CREATE INDEX idx_trees_fts ON trees USING GIN ("
|
|
"to_tsvector('english', COALESCE(name, '') || ' ' || COALESCE(description, ''))"
|
|
")"
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.execute("DROP INDEX IF EXISTS idx_trees_fts")
|