mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-11 16:52:38 +02:00
fix: PR changes
This commit is contained in:
parent
b7c68277f6
commit
46e921846b
2 changed files with 0 additions and 78 deletions
|
|
@ -1,38 +0,0 @@
|
|||
"""add inference_params to searchspaces
|
||||
|
||||
Revision ID: eb0c978da8fd
|
||||
Revises: 22
|
||||
Create Date: 2025-10-06 02:54:11.618100
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = 'eb0c978da8fd'
|
||||
down_revision: Union[str, None] = '22'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Upgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f('chucks_search_index'), table_name='chunks', postgresql_using='gin')
|
||||
op.drop_index(op.f('chucks_vector_index'), table_name='chunks', postgresql_using='hnsw')
|
||||
op.drop_index(op.f('document_search_index'), table_name='documents', postgresql_using='gin')
|
||||
op.drop_index(op.f('document_vector_index'), table_name='documents', postgresql_using='hnsw')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Downgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_index(op.f('document_vector_index'), 'documents', ['embedding'], unique=False, postgresql_using='hnsw')
|
||||
op.create_index(op.f('document_search_index'), 'documents', [sa.literal_column("to_tsvector('english'::regconfig, content)")], unique=False, postgresql_using='gin')
|
||||
op.create_index(op.f('chucks_vector_index'), 'chunks', ['embedding'], unique=False, postgresql_using='hnsw')
|
||||
op.create_index(op.f('chucks_search_index'), 'chunks', [sa.literal_column("to_tsvector('english'::regconfig, content)")], unique=False, postgresql_using='gin')
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
"""add litellm_params to searchspaces
|
||||
|
||||
Revision ID: fd3f2e543873
|
||||
Revises: eb0c978da8fd
|
||||
Create Date: 2025-10-07 04:11:50.392338
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = 'fd3f2e543873'
|
||||
down_revision: Union[str, None] = 'eb0c978da8fd'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Upgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f('chucks_search_index'), table_name='chunks', postgresql_using='gin')
|
||||
op.drop_index(op.f('chucks_vector_index'), table_name='chunks', postgresql_using='hnsw')
|
||||
op.drop_index(op.f('document_search_index'), table_name='documents', postgresql_using='gin')
|
||||
op.drop_index(op.f('document_vector_index'), table_name='documents', postgresql_using='hnsw')
|
||||
op.drop_column('searchspaces', 'inference_params')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Downgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('searchspaces', sa.Column('inference_params', postgresql.JSON(astext_type=sa.Text()), autoincrement=False, nullable=True))
|
||||
op.create_index(op.f('document_vector_index'), 'documents', ['embedding'], unique=False, postgresql_using='hnsw')
|
||||
op.create_index(op.f('document_search_index'), 'documents', [sa.literal_column("to_tsvector('english'::regconfig, content)")], unique=False, postgresql_using='gin')
|
||||
op.create_index(op.f('chucks_vector_index'), 'chunks', ['embedding'], unique=False, postgresql_using='hnsw')
|
||||
op.create_index(op.f('chucks_search_index'), 'chunks', [sa.literal_column("to_tsvector('english'::regconfig, content)")], unique=False, postgresql_using='gin')
|
||||
# ### end Alembic commands ###
|
||||
Loading…
Add table
Add a link
Reference in a new issue