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

12 statements  

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

1"""Add FlowRun.infrastructure_pid 

2 

3Revision ID: 7201de756d85 

4Revises: 4f90ad6349bd 

5Create Date: 2022-11-18 16:13:32.195734 

6 

7""" 

8 

9import sqlalchemy as sa 1a

10from alembic import op 1a

11 

12# revision identifiers, used by Alembic. 

13revision = "7201de756d85" 1a

14down_revision = "4f90ad6349bd" 1a

15branch_labels = None 1a

16depends_on = None 1a

17 

18 

19def upgrade(): 1a

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

21 batch_op.add_column(sa.Column("infrastructure_pid", sa.String(), nullable=True)) 1a

22 

23 

24def downgrade(): 1a

25 with op.batch_alter_table("flow_run", schema=None) as batch_op: 

26 batch_op.drop_column("infrastructure_pid")