1 """add-index-to-flow-run-infrastructure_document_id
2
3 Revision ID: 905134444e17
4 Revises: 88c2112b668f
5 Create Date: 2022-07-29 18:11:11.645359
6
7 """
8
9 from alembic import op 1 ctx 1a
10
11 # revision identifiers, used by Alembic.
12 revision = "905134444e17" 1 ctx 1a
13 down_revision = "88c2112b668f" 1 ctx 1a
14 branch_labels = None 1 ctx 1a
15 depends_on = None 1 ctx 1a
16
17
18 def upgrade ( ) : 1 ctx 1a
19 # ### commands auto generated by Alembic - please adjust! ###
20 with op . batch_alter_table ( "flow_run" , schema = None ) as batch_op : 1 ctx 1a
21 batch_op . create_index ( 1 ctx 1a
22 batch_op . f ( "ix_flow_run__infrastructure_document_id" ) ,
23 [ "infrastructure_document_id" ] ,
24 unique = False ,
25 )
26
27 # ### end Alembic commands ###
28
29
30 def downgrade ( ) : 1 ctx 1a
31 # ### commands auto generated by Alembic - please adjust! ###
32 with op . batch_alter_table ( "flow_run" , schema = None ) as batch_op :
33 batch_op . drop_index ( batch_op . f ( "ix_flow_run__infrastructure_document_id" ) )
34
35 # ### end Alembic commands ###