Coverage for /usr/local/lib/python3.12/site-packages/prefect/server/database/_migrations/versions/sqlite/2022_07_29_181111_905134444e17_add_index_to_flow_run_infrastructure_.py: 82%

11 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-12-05 11:21 +0000

1"""add-index-to-flow-run-infrastructure_document_id 

2 

3Revision ID: 905134444e17 

4Revises: 88c2112b668f 

5Create Date: 2022-07-29 18:11:11.645359 

6 

7""" 

8 

9from alembic import op 1a

10 

11# revision identifiers, used by Alembic. 

12revision = "905134444e17" 1a

13down_revision = "88c2112b668f" 1a

14branch_labels = None 1a

15depends_on = None 1a

16 

17 

18def upgrade(): 1a

19 # ### commands auto generated by Alembic - please adjust! ### 

20 with op.batch_alter_table("flow_run", schema=None) as batch_op: 1a

21 batch_op.create_index( 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 

30def downgrade(): 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 ###