1717
1818
1919def upgrade () -> None :
20- with op .batch_alter_table ("jobs" , schema = None ) as batch_op :
21- batch_op .add_column (sa .Column ("deployment_num" , sa .Integer (), nullable = True ))
22- with op .batch_alter_table ("jobs" , schema = None ) as batch_op :
23- batch_op .execute ("UPDATE jobs SET deployment_num = 0" )
24- batch_op .alter_column ("deployment_num" , nullable = False )
25-
2620 with op .batch_alter_table ("runs" , schema = None ) as batch_op :
2721 batch_op .add_column (sa .Column ("deployment_num" , sa .Integer (), nullable = True ))
2822 batch_op .add_column (sa .Column ("desired_replica_count" , sa .Integer (), nullable = True ))
@@ -32,6 +26,12 @@ def upgrade() -> None:
3226 batch_op .alter_column ("deployment_num" , nullable = False )
3327 batch_op .alter_column ("desired_replica_count" , nullable = False )
3428
29+ with op .batch_alter_table ("jobs" , schema = None ) as batch_op :
30+ batch_op .add_column (sa .Column ("deployment_num" , sa .Integer (), nullable = True ))
31+ with op .batch_alter_table ("jobs" , schema = None ) as batch_op :
32+ batch_op .execute ("UPDATE jobs SET deployment_num = 0" )
33+ batch_op .alter_column ("deployment_num" , nullable = False )
34+
3535
3636def downgrade () -> None :
3737 with op .batch_alter_table ("runs" , schema = None ) as batch_op :
0 commit comments