1 """Make flow_run_id nullable on task_run and log tables
2
3 Revision ID: 05ea6f882b1d
4 Revises: 8167af8df781
5 Create Date: 2023-09-25 12:18:06.722322
6
7 """
8
9 from alembic import op 1 ctx 1a
10
11 # revision identifiers, used by Alembic.
12 revision = "05ea6f882b1d" 1 ctx 1a
13 down_revision = "8167af8df781" 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 with op . batch_alter_table ( "task_run" ) as batch_op : 1 ctx 1a
20 batch_op . alter_column ( "flow_run_id" , nullable = True ) 1 ctx 1a
21
22 with op . batch_alter_table ( "log" ) as batch_op : 1 ctx 1a
23 batch_op . alter_column ( "flow_run_id" , nullable = True ) 1 ctx 1a
24
25
26 def downgrade ( ) : 1 ctx 1a
27 with op . batch_alter_table ( "task_run" ) as batch_op :
28 batch_op . alter_column ( "flow_run_id" , nullable = False )
29
30 with op . batch_alter_table ( "log" ) as batch_op :
31 batch_op . alter_column ( "flow_run_id" , nullable = False )