File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ """similarity search
2+
3+ Revision ID: f38a881a1f6c
4+ Revises: 032dfb7159d5
5+ Create Date: 2024-12-21 17:15:24.676449
6+
7+ """
8+
9+ # revision identifiers, used by Alembic.
10+ revision = "f38a881a1f6c"
11+ down_revision = "032dfb7159d5"
12+
13+ from alembic import op
14+
15+
16+ def upgrade ():
17+ # ### commands auto generated by Alembic - please adjust! ###
18+ # Alembic autogenerated is partial
19+ # op.create_index(
20+ # "obj_cnn_features_vector_hv_ivfflat_l2_5k_idx",
21+ # "obj_cnn_features_vector",
22+ # ["features"],
23+ # unique=False,
24+ # postgresql_using="ivfflat",
25+ # postgresql_with={"lists": 5000},
26+ # )
27+ op .execute (
28+ """
29+ SET LOCAL maintenance_work_mem = '8GB';
30+ SET LOCAL max_parallel_maintenance_workers = 8;
31+ CREATE INDEX obj_cnn_features_vector_hv_ivfflat_l2_5k_idx ON obj_cnn_features_vector
32+ USING ivfflat ((features::halfvec(50)) halfvec_l2_ops) WITH (lists = 5000)
33+ """
34+ )
35+ # ### end Alembic commands ###
36+
37+
38+ def downgrade ():
39+ # ### commands auto generated by Alembic - please adjust! ###
40+ op .drop_index (
41+ "obj_cnn_features_vector_hv_ivfflat_l2_5k_idx" ,
42+ table_name = "obj_cnn_features_vector" ,
43+ )
44+ # ### end Alembic commands ###
You can’t perform that action at this time.
0 commit comments