fix: improve OCR indexing and evidence review
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
"""Track the knowledge chunk format so existing documents can be reindexed.
|
||||
|
||||
Revision ID: 0002
|
||||
Revises: 0001
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
revision = "0002"
|
||||
down_revision = "0001"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
columns = {column["name"] for column in sa.inspect(op.get_bind()).get_columns("knowledge_documents")}
|
||||
if "index_version" not in columns:
|
||||
op.add_column("knowledge_documents", sa.Column("index_version", sa.Integer(), nullable=False, server_default="1"))
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column("knowledge_documents", "index_version")
|
||||
Reference in New Issue
Block a user