build: 打通 FastAPI 与 Vue 最小工程、依赖与数据库连接
后端入口、配置、Redis 与 Alembic 迁移就位;前端 Vite 工程可安装可构建。
This commit is contained in:
1 parent
fb0ddca4de
commit
2aee6286d6
167 files changed
+26082
No files matched your search
@@ -0,0 +1,35 @@
|
||||
"""Index knowledge_queue by organization and status
|
||||
|
||||
The plan's source limit now counts the crawls still queued or running, so
|
||||
every file upload and URL add reads this table. It had no index beyond the
|
||||
primary key and priority, and nothing purges completed rows, so that read
|
||||
was a sequential scan of every tenant's history.
|
||||
|
||||
Revision ID: idx_kq_org_status_001
|
||||
Revises: add_mcp_usage_guidance_001
|
||||
Create Date: 2026-09-18
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
# Keep revision ids under 32 characters: alembic_version.version_num is
|
||||
# varchar(32), and a longer id upgrades the schema then fails to record
|
||||
# itself, so every later start retries and crashes.
|
||||
revision: str = 'idx_kq_org_status_001'
|
||||
down_revision: Union[str, None] = 'add_mcp_usage_guidance_001'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
INDEX_NAME = 'ix_knowledge_queue_org_status'
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.create_index(
|
||||
INDEX_NAME, 'knowledge_queue', ['organization_id', 'status'], unique=False
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_index(INDEX_NAME, table_name='knowledge_queue')
|
||||
Reference in new issue
Block a user