update clean embedding cache query logic (#6483)

This commit is contained in:
Jyong
2024-07-20 01:29:25 +08:00
committed by GitHub
parent 27e08a8e2e
commit 1e0e573165
4 changed files with 46 additions and 6 deletions

View File

@@ -0,0 +1,32 @@
"""add-embedding-cache-created_at_index
Revision ID: 6e957a32015b
Revises: fecff1c3da27
Create Date: 2024-07-19 17:21:34.414705
"""
from alembic import op
import models as models
# revision identifiers, used by Alembic.
revision = '6e957a32015b'
down_revision = 'fecff1c3da27'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('embeddings', schema=None) as batch_op:
batch_op.create_index('created_at_idx', ['created_at'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('embeddings', schema=None) as batch_op:
batch_op.drop_index('created_at_idx')
# ### end Alembic commands ###