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

11 statements  

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

1"""Index Flow.created 

2 

3Revision ID: 71a57ec351d1 

4Revises: c8ff35f94028 

5Create Date: 2022-03-10 10:25:00.099168 

6 

7""" 

8 

9from alembic import op 1a

10 

11# revision identifiers, used by Alembic. 

12revision = "71a57ec351d1" 1a

13down_revision = "c8ff35f94028" 1a

14branch_labels = None 1a

15depends_on = None 1a

16 

17 

18def upgrade(): 1a

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

20 batch_op.create_index("ix_flow__created", ["created"], unique=False) 1a

21 

22 

23def downgrade(): 1a

24 with op.batch_alter_table("flow", schema=None) as batch_op: 

25 batch_op.drop_index("ix_flow__created")