6e957a32015b_add_embedding_cache_created_at_index.py 824 B

123456789101112131415161718192021222324252627282930313233
  1. """add-embedding-cache-created_at_index
  2. Revision ID: 6e957a32015b
  3. Revises: fecff1c3da27
  4. Create Date: 2024-07-19 17:21:34.414705
  5. """
  6. from alembic import op
  7. import models as models
  8. # revision identifiers, used by Alembic.
  9. revision = '6e957a32015b'
  10. down_revision = 'fecff1c3da27'
  11. branch_labels = None
  12. depends_on = None
  13. def upgrade():
  14. # ### commands auto generated by Alembic - please adjust! ###
  15. with op.batch_alter_table('embeddings', schema=None) as batch_op:
  16. batch_op.create_index('created_at_idx', ['created_at'], unique=False)
  17. # ### end Alembic commands ###
  18. def downgrade():
  19. # ### commands auto generated by Alembic - please adjust! ###
  20. with op.batch_alter_table('embeddings', schema=None) as batch_op:
  21. batch_op.drop_index('created_at_idx')
  22. # ### end Alembic commands ###