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

12 statements  

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

1"""Add retry and restart metadata 

2 

3Revision ID: af52717cf201 

4Revises: ad4b1b4d1e9d 

5Create Date: 2022-10-19 15:58:10.016251 

6 

7""" 

8 

9import sqlalchemy as sa 1a

10from alembic import op 1a

11 

12# revision identifiers, used by Alembic. 

13revision = "af52717cf201" 1a

14down_revision = "3ced59d8806b" 1a

15branch_labels = None 1a

16depends_on = None 1a

17 

18 

19def upgrade(): 1a

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

21 batch_op.add_column( 1a

22 sa.Column( 

23 "flow_run_run_count", sa.Integer(), server_default="0", nullable=False 

24 ) 

25 ) 

26 

27 # ### end Alembic commands ### 

28 

29 

30def downgrade(): 1a

31 with op.batch_alter_table("task_run", schema=None) as batch_op: 

32 batch_op.drop_column("flow_run_run_count") 

33 

34 # ### end Alembic commands ###